Commit e94b07dc authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

CmmCommonBlockElim: Ignore CmmUnwind nodes

We don't want unwind information to affect the code we produce.
Consequently we need to ensure that CBE ignores unwind nodes for the
purposes of equality.

Test Plan: Validate

Reviewers: scpmw, simonmar, austin

Reviewed By: simonmar

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2739
parent 1a6bdca0
......@@ -134,7 +134,6 @@ hash_block block =
hash_node :: CmmNode O x -> Word32
hash_node n | dont_care n = 0 -- don't care
hash_node (CmmUnwind _ e) = hash_e e
hash_node (CmmAssign r e) = hash_reg r + hash_e e
hash_node (CmmStore e e') = hash_e e + hash_e e'
hash_node (CmmUnsafeForeignCall t _ as) = hash_tgt t + hash_list hash_e as
......@@ -181,6 +180,7 @@ hash_block block =
dont_care :: CmmNode O x -> Bool
dont_care CmmComment {} = True
dont_care CmmTick {} = True
dont_care CmmUnwind {} = True
dont_care _other = False
-- Utilities: equality and substitution on the graph.
......
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