From: Ben.Lippmeier.anu.edu.au Date: Thu, 17 Sep 2009 03:44:27 +0000 (+0000) Subject: NCG: Also show the result of applying coalesings with -ddump-asm-regalloc-stages X-Git-Tag: 2010-11-18~682 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=d8e54e50fd073c8f599da960ebc40f34905968b2 NCG: Also show the result of applying coalesings with -ddump-asm-regalloc-stages --- diff --git a/compiler/nativeGen/RegAlloc/Graph/Main.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs index 35ec879..40c3c00 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Main.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -178,6 +178,7 @@ regAlloc_spin { raGraph = graph , raGraphColored = graph_colored_lint , raCoalesced = rmCoalesce + , raCodeCoalesced = code_coalesced , raPatched = code_patched , raSpillClean = code_spillclean , raFinal = code_final diff --git a/compiler/nativeGen/RegAlloc/Graph/Stats.hs b/compiler/nativeGen/RegAlloc/Graph/Stats.hs index 10ab0cb..339bd41 100644 --- a/compiler/nativeGen/RegAlloc/Graph/Stats.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Stats.hs @@ -53,13 +53,14 @@ data RegAllocStats instr -- a successful coloring | RegAllocStatsColored - { raGraph :: Color.Graph VirtualReg RegClass RealReg -- ^ the uncolored graph - , raGraphColored :: Color.Graph VirtualReg RegClass RealReg -- ^ the coalesced and colored graph - , raCoalesced :: UniqFM VirtualReg -- ^ the regs that were coaleced - , raPatched :: [LiveCmmTop instr] -- ^ code with vregs replaced by hregs - , raSpillClean :: [LiveCmmTop instr] -- ^ code with unneeded spill\/reloads cleaned out - , raFinal :: [NatCmmTop instr] -- ^ final code - , raSRMs :: (Int, Int, Int) } -- ^ spill\/reload\/reg-reg moves present in this code + { raGraph :: Color.Graph VirtualReg RegClass RealReg -- ^ the uncolored graph + , raGraphColored :: Color.Graph VirtualReg RegClass RealReg -- ^ the coalesced and colored graph + , raCoalesced :: UniqFM VirtualReg -- ^ the regs that were coaleced + , raCodeCoalesced :: [LiveCmmTop instr] -- ^ code with coalescings applied + , raPatched :: [LiveCmmTop instr] -- ^ code with vregs replaced by hregs + , raSpillClean :: [LiveCmmTop instr] -- ^ code with unneeded spill\/reloads cleaned out + , raFinal :: [NatCmmTop instr] -- ^ final code + , raSRMs :: (Int, Int, Int) } -- ^ spill\/reload\/reg-reg moves present in this code instance Outputable instr => Outputable (RegAllocStats instr) where @@ -114,6 +115,10 @@ instance Outputable instr => Outputable (RegAllocStats instr) where $$ text "" else empty) + $$ text "# Native code after coalescings applied." + $$ ppr (raCodeCoalesced s) + $$ text "" + $$ text "# Native code after register allocation." $$ ppr (raPatched s) $$ text ""