OSDN Git Service

[RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and single...
authorPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 22:07:04 +0000 (22:07 +0000)
committerPhilip Reames <listmail@philipreames.com>
Fri, 10 Apr 2015 22:07:04 +0000 (22:07 +0000)
commit82374f6b8a017b4d5fd3937ccba23d22fe390395
tree5313c79d14a6fe37aa968930d68c7268352e7394
parentcb148c8541b015fe4db2c9fd7cfccd767ba6db1a
[RewriteStatepointsForGC] Preprocess the IR to remove unreachable blocks and single entry phis

Two related small changes:

    Various dominance based queries about liveness can get confused if we're talking about unreachable blocks. To avoid reasoning about such cases, just remove them before rewriting statepoints.
    Remove single entry phis (likely left behind by LCSSA) to reduce the number of live values.

Both of these are motivated by http://reviews.llvm.org/D8674 which will be submitted shortly.

Differential Revision: http://reviews.llvm.org/D8675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234651 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
test/Transforms/RewriteStatepointsForGC/preprocess.ll [new file with mode: 0644]