summaryrefslogtreecommitdiff
path: root/compiler/cmm/CmmCommonBlockElim.hs
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2012-07-09 16:08:21 +0100
committerSimon Marlow <marlowsd@gmail.com>2012-07-09 16:23:45 +0100
commitc6a61235aa0baf6f9e8a41c5a771ccc7e32c23a5 (patch)
treea288174c5f6ab513319bd4d1dae6ef79044f5ae9 /compiler/cmm/CmmCommonBlockElim.hs
parentc9cb46bec47ada686d18437578fbc95281c9c6d4 (diff)
downloadhaskell-c6a61235aa0baf6f9e8a41c5a771ccc7e32c23a5.tar.gz
Track liveness of GlobalRegs in the new code generator
This gives the register allocator access to R1.., F1.., D1.. etc. for the new code generator, and is a cheap way to eliminate all the extra "x = R1" assignments that we get from copyIn.
Diffstat (limited to 'compiler/cmm/CmmCommonBlockElim.hs')
-rw-r--r--compiler/cmm/CmmCommonBlockElim.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/cmm/CmmCommonBlockElim.hs b/compiler/cmm/CmmCommonBlockElim.hs
index eafa2a00f3..614edf23a2 100644
--- a/compiler/cmm/CmmCommonBlockElim.hs
+++ b/compiler/cmm/CmmCommonBlockElim.hs
@@ -100,7 +100,7 @@ hash_block block =
hash_node (CmmUnsafeForeignCall t _ as) = hash_tgt t + hash_list hash_e as
hash_node (CmmBranch _) = 23 -- NB. ignore the label
hash_node (CmmCondBranch p _ _) = hash_e p
- hash_node (CmmCall e _ _ _ _) = hash_e e
+ hash_node (CmmCall e _ _ _ _ _) = hash_e e
hash_node (CmmForeignCall t _ _ _ _ _) = hash_tgt t
hash_node (CmmSwitch e _) = hash_e e
@@ -193,8 +193,8 @@ eqLastWith :: (BlockId -> BlockId -> Bool) -> CmmNode O C -> CmmNode O C -> Bool
eqLastWith eqBid (CmmBranch bid1) (CmmBranch bid2) = eqBid bid1 bid2
eqLastWith eqBid (CmmCondBranch c1 t1 f1) (CmmCondBranch c2 t2 f2) =
c1 == c2 && eqBid t1 t2 && eqBid f1 f2
-eqLastWith eqBid (CmmCall t1 c1 a1 r1 u1) (CmmCall t2 c2 a2 r2 u2) =
- t1 == t2 && eqMaybeWith eqBid c1 c2 && a1 == a2 && r1 == r2 && u1 == u2
+eqLastWith eqBid (CmmCall t1 c1 g1 a1 r1 u1) (CmmCall t2 c2 g2 a2 r2 u2) =
+ t1 == t2 && eqMaybeWith eqBid c1 c2 && a1 == a2 && r1 == r2 && u1 == u2 && g1 == g2
eqLastWith eqBid (CmmSwitch e1 bs1) (CmmSwitch e2 bs2) =
e1 == e2 && eqListWith (eqMaybeWith eqBid) bs1 bs2
eqLastWith _ _ _ = False