summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2015-05-26 21:16:42 +0000
committerPhilip Reames <listmail@philipreames.com>2015-05-26 21:16:42 +0000
commit52e7a59e50c8b87a311adf303990fceac8a9fb13 (patch)
tree1f7775f8b45e24a8ea8be70c39b33e5b804860d4 /llvm/lib/Transforms
parent1a3f965fe36ef23b41377bcdd9e85c5e24f20e64 (diff)
downloadbcm5719-llvm-52e7a59e50c8b87a311adf303990fceac8a9fb13.tar.gz
bcm5719-llvm-52e7a59e50c8b87a311adf303990fceac8a9fb13.zip
[PlaceSafepoints] Entry safepoint location doesn't need to be a terminator
Long ago, the poll insertion code assumed that the insertion site was a terminator. As a result, the entry selection code would split a basic block to ensure it could pass a terminator. The insertion code was updated quite a while ago - possibly before it ever landed upstream - but the now redundant work was never removed. While I'm at it, remove a comment which doesn't apply to the upstreamed code. NFC intended. llvm-svn: 238254
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
index 3e3ea39bdb1..3e7deeba9f2 100644
--- a/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
+++ b/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp
@@ -417,12 +417,6 @@ static Instruction *findLocationForEntrySafepoint(Function &F,
// that can grow the stack. This, combined with backedge polls,
// give us all the progress guarantees we need.
- // Due to the way the frontend generates IR, we may have a couple of initial
- // basic blocks before the first bytecode. These will be single-entry
- // single-exit blocks which conceptually are just part of the first 'real
- // basic block'. Since we don't have deopt state until the first bytecode,
- // walk forward until we've found the first unconditional branch or merge.
-
// hasNextInstruction and nextInstruction are used to iterate
// through a "straight line" execution sequence.
@@ -465,17 +459,7 @@ static Instruction *findLocationForEntrySafepoint(Function &F,
assert((hasNextInstruction(cursor) || cursor->isTerminator()) &&
"either we stopped because of a call, or because of terminator");
- if (cursor->isTerminator()) {
- return cursor;
- }
-
- BasicBlock *BB = cursor->getParent();
- SplitBlock(BB, cursor, &DT);
-
- // SplitBlock updates the DT
- DEBUG(DT.verifyDomTree());
-
- return BB->getTerminator();
+ return cursor;
}
/// Identify the list of call sites which need to be have parseable state
OpenPOWER on IntegriCloud