X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmProcPoint.hs;h=aa0ef01d37fbd8575749da759f19e18c23ea4d57;hb=7b2ac617ee9e54ee4e4c413a13085d9bda548d14;hp=fe64608022fb1ab3ea450a35975ff27063a0918a;hpb=55f8b001f06d0a2a1e9b0e84cbaa5f2f109270df;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs index fe64608..aa0ef01 100644 --- a/compiler/cmm/CmmProcPoint.hs +++ b/compiler/cmm/CmmProcPoint.hs @@ -1,9 +1,17 @@ +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module CmmProcPoint ( calculateProcPoints ) where #include "HsVersions.h" +import BlockId import Cmm import CmmBrokenBlock import Dataflow @@ -79,8 +87,12 @@ calculateNewProcPoints owners block = where parent_owners = lookupWithDefaultUFM owners emptyUniqSet parent_id child_owners = lookupWithDefaultUFM owners emptyUniqSet child_id - needs_proc_point = not $ isEmptyUniqSet $ - child_owners `minusUniqSet` parent_owners + needs_proc_point = + -- only if parent isn't dead + (not $ isEmptyUniqSet parent_owners) && + -- and only if child has more owners than parent + (not $ isEmptyUniqSet $ + child_owners `minusUniqSet` parent_owners) calculateOwnership :: BlockEnv BrokenBlock -> UniqSet BlockId