projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
af6e6c7
)
NCG: Emit a warning on unreachable code block instead of panicing
author
benl@ouroborus.net
<unknown>
Wed, 23 Jun 2010 08:50:02 +0000
(08:50 +0000)
committer
benl@ouroborus.net
<unknown>
Wed, 23 Jun 2010 08:50:02 +0000
(08:50 +0000)
compiler/nativeGen/RegAlloc/Linear/Main.hs
patch
|
blob
|
history
diff --git
a/compiler/nativeGen/RegAlloc/Linear/Main.hs
b/compiler/nativeGen/RegAlloc/Linear/Main.hs
index
29cc0e5
..
63f2814
100644
(file)
--- a/
compiler/nativeGen/RegAlloc/Linear/Main.hs
+++ b/
compiler/nativeGen/RegAlloc/Linear/Main.hs
@@
-206,15
+206,16
@@
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.
-}
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
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:"
+ = pprTrace "RegAlloc.Linear.Main.process: no progress made, bailing out."
+ ( text "Unreachable blocks:"
$$ vcat (map ppr next_round))
$$ vcat (map ppr next_round))
+ $ return $ reverse accum
| otherwise
= process first_id block_live
| otherwise
= process first_id block_live
@@
-380,9
+381,9
@@
genRaInsn block_live new_instrs block_id instr r_dying w_dying =
clobber_saves <- saveClobberedTemps real_written r_dying
-- debugging
clobber_saves <- saveClobberedTemps real_written r_dying
-- debugging
- freeregs <- getFreeRegsR
+{- freeregs <- getFreeRegsR
assig <- getAssigR
assig <- getAssigR
-{- pprTrace "genRaInsn"
+ pprTrace "genRaInsn"
(ppr instr
$$ text "r_dying = " <+> ppr r_dying
$$ text "w_dying = " <+> ppr w_dying
(ppr instr
$$ text "r_dying = " <+> ppr r_dying
$$ text "w_dying = " <+> ppr w_dying