[commit: ghc] ghc-8.2: SetLevels: Substitute in ticks in lvlMFE (9565e52)
git at git.haskell.org
git at git.haskell.org
Tue Sep 19 21:10:56 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/9565e5267c3376f94f501ec0e1f9ee712a1f6f10/ghc
>---------------------------------------------------------------
commit 9565e5267c3376f94f501ec0e1f9ee712a1f6f10
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Sep 4 08:05:33 2017 -0400
SetLevels: Substitute in ticks in lvlMFE
Previously SetLevels.lvlMFE would fail to substitute in ticks, unlike
lvlExpr. This lead to #13481. Fix this.
Test Plan: `make test TEST=T12622 WAY=ghci`
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13481
Differential Revision: https://phabricator.haskell.org/D3920
(cherry picked from commit cd857dd415378ac4204a164407d350b0c3ede5ae)
>---------------------------------------------------------------
9565e5267c3376f94f501ec0e1f9ee712a1f6f10
compiler/simplCore/SetLevels.hs | 3 ++-
testsuite/tests/codeGen/should_run/all.T | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs
index 90e1d53..b787695 100644
--- a/compiler/simplCore/SetLevels.hs
+++ b/compiler/simplCore/SetLevels.hs
@@ -544,7 +544,8 @@ lvlMFE env _ (_, AnnType ty)
-- and then inline lvl. Better just to float out the payload.
lvlMFE env strict_ctxt (_, AnnTick t e)
= do { e' <- lvlMFE env strict_ctxt e
- ; return (Tick t e') }
+ ; let t' = substTickish (le_subst env) t
+ ; return (Tick t' e') }
lvlMFE env strict_ctxt (_, AnnCast e (_, co))
= do { e' <- lvlMFE env strict_ctxt e
diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T
index 9f334cf..ffe4b64 100644
--- a/testsuite/tests/codeGen/should_run/all.T
+++ b/testsuite/tests/codeGen/should_run/all.T
@@ -148,7 +148,7 @@ test('PopCnt', omit_ways(['ghci']), multi_compile_and_run,
['PopCnt', [('PopCnt_cmm.cmm', '')], ''])
test('T12059', normal, compile_and_run, [''])
test('T12433', normal, compile_and_run, [''])
-test('T12622', expect_broken_for(13481, ['ghci']), multimod_compile_and_run, ['T12622', '-O'])
+test('T12622', normal, multimod_compile_and_run, ['T12622', '-O'])
test('T12757', normal, compile_and_run, [''])
test('T12855', normal, compile_and_run, [''])
test('T9577', [ unless(arch('x86_64') or arch('i386'),skip),
More information about the ghc-commits
mailing list