[commit: ghc] master: CmmCommonBlockElim: Ignore CmmUnwind nodes (e94b07d)

git at git.haskell.org git at git.haskell.org
Tue Jan 10 19:21:47 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e94b07dc791960439df18cfa600a2f42fc945336/ghc

>---------------------------------------------------------------

commit e94b07dc791960439df18cfa600a2f42fc945336
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Thu Jan 5 17:02:00 2017 -0500

    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


>---------------------------------------------------------------

e94b07dc791960439df18cfa600a2f42fc945336
 compiler/cmm/CmmCommonBlockElim.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/cmm/CmmCommonBlockElim.hs b/compiler/cmm/CmmCommonBlockElim.hs
index 989eb2f..3dc8202 100644
--- a/compiler/cmm/CmmCommonBlockElim.hs
+++ b/compiler/cmm/CmmCommonBlockElim.hs
@@ -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.



More information about the ghc-commits mailing list