[llvm] r250783 - [RS4GC] Minor cleanup to `normalizeForInvokeSafepoint`; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 19 18:06:17 PDT 2015
Author: sanjoy
Date: Mon Oct 19 20:06:17 2015
New Revision: 250783
URL: http://llvm.org/viewvc/llvm-project?rev=250783&view=rev
Log:
[RS4GC] Minor cleanup to `normalizeForInvokeSafepoint`; NFC
Modified:
llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=250783&r1=250782&r2=250783&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Mon Oct 19 20:06:17 2015
@@ -1249,14 +1249,14 @@ static BasicBlock *
normalizeForInvokeSafepoint(BasicBlock *BB, BasicBlock *InvokeParent,
DominatorTree &DT) {
BasicBlock *Ret = BB;
- if (!BB->getUniquePredecessor()) {
+ if (!BB->getUniquePredecessor())
Ret = SplitBlockPredecessors(BB, InvokeParent, "", &DT);
- }
// Now that 'ret' has unique predecessor we can safely remove all phi nodes
// from it
FoldSingleEntryPHINodes(Ret);
- assert(!isa<PHINode>(Ret->begin()));
+ assert(!isa<PHINode>(Ret->begin()) &&
+ "All PHI nodes should have been removed!");
// At this point, we can safely insert a gc.relocate as the first instruction
// in Ret if needed.
More information about the llvm-commits
mailing list