Commit 6c2c07c5 authored by Simon Marlow's avatar Simon Marlow

bugfix: cope when a source reg is dead at a join point

We didn't trip over this one until I started generating code without
proc-point splitting, which has more join points and loops.
parent 93c03f84
...@@ -235,16 +235,10 @@ joinToTargets_again ...@@ -235,16 +235,10 @@ joinToTargets_again
-- --
makeRegMovementGraph :: RegMap Loc -> RegMap Loc -> [(Unique, Loc, [Loc])] makeRegMovementGraph :: RegMap Loc -> RegMap Loc -> [(Unique, Loc, [Loc])]
makeRegMovementGraph adjusted_assig dest_assig makeRegMovementGraph adjusted_assig dest_assig
= let = [ node | (vreg, src) <- ufmToList adjusted_assig
mkNodes src vreg -- source reg might not be needed at the dest:
= expandNode vreg src , Just loc <- [lookupUFM_Directly dest_assig vreg]
$ lookupWithDefaultUFM_Directly , node <- expandNode vreg src loc ]
dest_assig
(panic "RegAllocLinear.makeRegMovementGraph")
vreg
in [ node | (vreg, src) <- ufmToList adjusted_assig
, node <- mkNodes src vreg ]
-- | Expand out the destination, so InBoth destinations turn into -- | Expand out the destination, so InBoth destinations turn into
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment