X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCmmProcPoint.hs;h=df408c666f829f7a4cfe45c21edeafbeb5e66496;hb=a8427a4125e9b78e88a487eeabf018f1c6e8bc08;hp=fe64608022fb1ab3ea450a35975ff27063a0918a;hpb=55f8b001f06d0a2a1e9b0e84cbaa5f2f109270df;p=ghc-hetmet.git diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs index fe64608..df408c6 100644 --- a/compiler/cmm/CmmProcPoint.hs +++ b/compiler/cmm/CmmProcPoint.hs @@ -79,8 +79,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