NCG: Also show the result of applying coalesings with -ddump-asm-regalloc-stages
[ghc-hetmet.git] / compiler / nativeGen / RegAlloc / Graph / Stats.hs
index 10ab0cb..339bd41 100644 (file)
@@ -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 ""