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

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
makeRegMovementGraph :: RegMap Loc -> RegMap Loc -> [(Unique, Loc, [Loc])]
makeRegMovementGraph adjusted_assig dest_assig
= let
mkNodes src vreg
= expandNode vreg src
$ lookupWithDefaultUFM_Directly
(panic "RegAllocLinear.makeRegMovementGraph")
in [ node | (vreg, src) <- ufmToList adjusted_assig
, node <- mkNodes src vreg ]
= [ node | (vreg, src) <- ufmToList adjusted_assig
-- source reg might not be needed at the dest:
, Just loc <- [lookupUFM_Directly dest_assig vreg]
, node <- expandNode vreg src loc ]
-- | 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