diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-07-21 12:52:01 +0100 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-07-21 12:52:01 +0100 |
| commit | f88b20f4139773a956430c99664d2db5b8c01202 (patch) | |
| tree | 458530f9901c03d4af943d66ec511d89a1334b76 /compiler/simplCore/SimplCore.lhs | |
| parent | 98e9096cdcfe7501109b66e3a22e7a41eee4521b (diff) | |
| download | haskell-f88b20f4139773a956430c99664d2db5b8c01202.tar.gz | |
Simplify the treatment of RULES in OccurAnal
I realised that my recently-added cunning stuff about
RULES for imported Ids was simply wrong, so this patch
removes it. See Note [Rules for imported functions],
which explains it all.
This patch also does quite a bit of refactoring in
the treatment of loop breakers.
Diffstat (limited to 'compiler/simplCore/SimplCore.lhs')
| -rw-r--r-- | compiler/simplCore/SimplCore.lhs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/simplCore/SimplCore.lhs b/compiler/simplCore/SimplCore.lhs index d3a7f62d78..226c9c4137 100644 --- a/compiler/simplCore/SimplCore.lhs +++ b/compiler/simplCore/SimplCore.lhs @@ -579,7 +579,8 @@ simplifyPgmIO :: CoreToDo simplifyPgmIO pass@(CoreDoSimplify max_iterations mode) hsc_env us hpt_rule_base - guts@(ModGuts { mg_binds = binds, mg_rules = rules + guts@(ModGuts { mg_module = this_mod + , mg_binds = binds, mg_rules = rules , mg_fam_inst_env = fam_inst_env }) = do { (termination_msg, it_count, counts_out, guts') <- do_iteration us 1 [] binds rules @@ -596,7 +597,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode) dflags = hsc_dflags hsc_env dump_phase = dumpSimplPhase dflags mode simpl_env = mkSimplEnv mode - active_rule = activeRule dflags simpl_env + active_rule = activeRule simpl_env do_iteration :: UniqSupply -> Int -- Counts iterations @@ -634,7 +635,7 @@ simplifyPgmIO pass@(CoreDoSimplify max_iterations mode) InitialPhase -> mg_vect_decls guts _ -> [] ; tagged_binds = {-# SCC "OccAnal" #-} - occurAnalysePgm active_rule rules maybeVects binds + occurAnalysePgm this_mod active_rule rules maybeVects binds } ; Err.dumpIfSet_dyn dflags Opt_D_dump_occur_anal "Occurrence analysis" (pprCoreBindings tagged_binds); |
