diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-10-29 15:23:14 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-11-04 10:37:54 +0000 |
commit | c8c18a106458c80ec0eb5108d11b4ed9e2bc7478 (patch) | |
tree | e75aa400cbc882a4e4f7b61de5d0788758caaa3b /compiler/nativeGen/AsmCodeGen.lhs | |
parent | 27ba070c56fa6c583a34dc9eaede0083530f1dbe (diff) | |
download | haskell-c8c18a106458c80ec0eb5108d11b4ed9e2bc7478.tar.gz |
Some refactoring around endPass and debug dumping
I forget all the details, but I spent some time trying to
understand the current setup, and tried to simplify it a bit
Diffstat (limited to 'compiler/nativeGen/AsmCodeGen.lhs')
-rw-r--r-- | compiler/nativeGen/AsmCodeGen.lhs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 5b4a517cbb..56c18ea152 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -316,8 +316,7 @@ finishNativeGen dflags ncgImpl bufh@(BufHandle _ _ h) (imports, prof) $ [ Color.raGraph stat | stat@Color.RegAllocStatsStart{} <- stats] - dumpSDoc dflags Opt_D_dump_asm_stats "NCG stats" - $ Color.pprStats stats graphGlobal + dump_stats (Color.pprStats stats graphGlobal) dumpIfSet_dyn dflags Opt_D_dump_asm_conflicts "Register conflict graph" @@ -332,13 +331,14 @@ finishNativeGen dflags ncgImpl bufh@(BufHandle _ _ h) (imports, prof) -- dump global NCG stats for linear allocator (case concat $ catMaybes linearStats of [] -> return () - stats -> dumpSDoc dflags Opt_D_dump_asm_stats "NCG stats" - $ Linear.pprStats (concat native) stats) + stats -> dump_stats (Linear.pprStats (concat native) stats)) -- write out the imports Pretty.printDoc Pretty.LeftMode (pprCols dflags) h $ withPprStyleDoc dflags (mkCodeStyle AsmStyle) $ makeImportsDoc dflags (concat imports) + where + dump_stats = dumpSDoc dflags alwaysQualify Opt_D_dump_asm_stats "NCG stats" cmmNativeGenStream :: (Outputable statics, Outputable instr, Instruction instr) => DynFlags |