diff options
| -rw-r--r-- | compiler/cmm/CmmProcPoint.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/cmm/CmmProcPoint.hs b/compiler/cmm/CmmProcPoint.hs index fe64608022..df408c666f 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 |
