HomePhabricator

[RewriteStatepoints] Fix stale parse points

Description

[RewriteStatepoints] Fix stale parse points

Summary:
RewriteStatepointsForGC collects parse points for further processing.
During the collection if a callsite is found in an unreachable block
(DominatorTree::isReachableFromEntry()) then all unreachable blocks are
removed by removeUnreachableBlocks(). Some of the removed blocks could
have been reachable according to DominatorTree::isReachableFromEntry().
In this case the collected parse points became stale and resulted in a
crash when accessed.

The fix is to unconditionally canonicalize the IR to
removeUnreachableBlocks and then collect the parse points.

The added test crashes with the old version and passes with this patch.

Patch by Yevgeny Rouban!

Reviewed by: Anna

Differential Revision: https://reviews.llvm.org/D43929

Details

Committed
dneilsonMar 5 2018, 2:27 PM
Reviewer
anna
Differential Revision
D43929: [RewriteStatepoints] Fix stale parse points
Parents
rL326747: [X86] Add silvermont fp arithmetic cost model tests
Branches
Unknown
Tags
Unknown