X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAlloc%2FLinear%2FMain.hs;h=64dbe75cd245b5545f8ac6752ee0984c20e6509e;hb=e1744771112465b5d43df1d7e38c8a7415b4705f;hp=29cc0e5f7fa8d1a26937982f83fa4fd7b696aa40;hpb=e17cf7ff32778f4e6b3622855f25426251e843d6;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs index 29cc0e5..64dbe75 100644 --- a/compiler/nativeGen/RegAlloc/Linear/Main.hs +++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs @@ -206,15 +206,18 @@ linearRA_SCCs first_id block_live blocksAcc (CyclicSCC blocks : sccs) some reason then this function will loop. We should probably do some more sanity checking to guard against this eventuality. -} - + process _ _ [] [] accum _ = return $ reverse accum process first_id block_live [] next_round accum madeProgress | not madeProgress - = pprPanic "RegAlloc.Linear.Main.process: no progress made, bailing out" - ( text "stalled blocks:" - $$ vcat (map ppr next_round)) + + {- BUGS: There are so many unreachable blocks in the code the warnings are overwhelming. + pprTrace "RegAlloc.Linear.Main.process: no progress made, bailing out." + ( text "Unreachable blocks:" + $$ vcat (map ppr next_round)) -} + = return $ reverse accum | otherwise = process first_id block_live @@ -380,9 +383,9 @@ genRaInsn block_live new_instrs block_id instr r_dying w_dying = clobber_saves <- saveClobberedTemps real_written r_dying -- debugging - freeregs <- getFreeRegsR +{- freeregs <- getFreeRegsR assig <- getAssigR -{- pprTrace "genRaInsn" + pprTrace "genRaInsn" (ppr instr $$ text "r_dying = " <+> ppr r_dying $$ text "w_dying = " <+> ppr w_dying