summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmPipeline.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2013-11-28 10:55:48 +0000
committerSimon Marlow <marlowsd@gmail.com>2013-11-28 12:52:23 +0000
commit77e33bcb6146b57f3b4f6f2574a7c1c35fcfbcd4 (patch)
tree00cb8036861b1b51358fac4d1a20f1fe5af45051 /compiler/cmm/CmmPipeline.hs
parent9021737d6cc8f9eb992377dc7f7446017062b79c (diff)
downloadhaskell-77e33bcb6146b57f3b4f6f2574a7c1c35fcfbcd4.tar.gz
-ddump-cmm: don't dump the proc point stage if we didn't do anything
Diffstat (limited to 'compiler/cmm/CmmPipeline.hs')
-rw-r--r--compiler/cmm/CmmPipeline.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/compiler/cmm/CmmPipeline.hs b/compiler/cmm/CmmPipeline.hs
index cc204e95ec..5c2d54d5ba 100644
--- a/compiler/cmm/CmmPipeline.hs
+++ b/compiler/cmm/CmmPipeline.hs
@@ -79,11 +79,14 @@ cpsTop hsc_env proc =
let call_pps = {-# SCC "callProcPoints" #-} callProcPoints g
proc_points <-
if splitting_proc_points
- then {-# SCC "minimalProcPointSet" #-} runUniqSM $
+ then do
+ pp <- {-# SCC "minimalProcPointSet" #-} runUniqSM $
minimalProcPointSet (targetPlatform dflags) call_pps g
+ dumpIfSet_dyn dflags Opt_D_dump_cmm "Proc points"
+ (ppr l $$ ppr pp $$ ppr g)
+ return pp
else
- return call_pps
- dumpIfSet_dyn dflags Opt_D_dump_cmm "Proc points" (ppr l $$ ppr proc_points $$ ppr g)
+ return call_pps
let noncall_pps = proc_points `setDifference` call_pps
when (not (setNull noncall_pps) && dopt Opt_D_dump_cmm dflags) $