[llvm] r245487 - Replace some calls to isa<LandingPadInst> with isEHPad()
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 19 12:54:02 PDT 2015
Author: majnemer
Date: Wed Aug 19 14:54:02 2015
New Revision: 245487
URL: http://llvm.org/viewvc/llvm-project?rev=245487&view=rev
Log:
Replace some calls to isa<LandingPadInst> with isEHPad()
No functionality change is intended.
Modified:
llvm/trunk/lib/Transforms/Scalar/ConstantHoisting.cpp
llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
llvm/trunk/tools/bugpoint/CrashDebugger.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/ConstantHoisting.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ConstantHoisting.cpp?rev=245487&r1=245486&r2=245487&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ConstantHoisting.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ConstantHoisting.cpp Wed Aug 19 14:54:02 2015
@@ -223,10 +223,10 @@ Instruction *ConstantHoisting::findMatIn
}
// The simple and common case. This also includes constant expressions.
- if (!isa<PHINode>(Inst) && !isa<LandingPadInst>(Inst))
+ if (!isa<PHINode>(Inst) && !Inst->isEHPad())
return Inst;
- // We can't insert directly before a phi node or landing pad. Insert before
+ // We can't insert directly before a phi node or an eh pad. Insert before
// the terminator of the incoming or dominating block.
assert(Entry != Inst->getParent() && "PHI or landing pad in entry block!");
if (Idx != ~0U && isa<PHINode>(Inst))
Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=245487&r1=245486&r2=245487&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Aug 19 14:54:02 2015
@@ -1885,8 +1885,8 @@ void IndVarSimplify::SinkUnusedInvariant
if (isa<DbgInfoIntrinsic>(I))
continue;
- // Skip landingpad instructions.
- if (isa<LandingPadInst>(I))
+ // Skip eh pad instructions.
+ if (I->isEHPad())
continue;
// Don't sink alloca: we never want to sink static alloca's out of the
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=245487&r1=245486&r2=245487&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Aug 19 14:54:02 2015
@@ -4420,7 +4420,7 @@ LSRInstance::AdjustInsertPositionForExpa
}
}
- assert(!isa<PHINode>(LowestIP) && !isa<LandingPadInst>(LowestIP)
+ assert(!isa<PHINode>(LowestIP) && !LowestIP->isEHPad()
&& !isa<DbgInfoIntrinsic>(LowestIP) &&
"Insertion point must be a normal instruction");
@@ -4432,7 +4432,7 @@ LSRInstance::AdjustInsertPositionForExpa
while (isa<PHINode>(IP)) ++IP;
// Ignore landingpad instructions.
- while (isa<LandingPadInst>(IP)) ++IP;
+ while (IP->isEHPad()) ++IP;
// Ignore debug intrinsics.
while (isa<DbgInfoIntrinsic>(IP)) ++IP;
Modified: llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp?rev=245487&r1=245486&r2=245487&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/SimplifyCFG.cpp Wed Aug 19 14:54:02 2015
@@ -1265,7 +1265,7 @@ static bool SinkThenElseCodeToEnd(Branch
// Cannot move control-flow-involving, volatile loads, vaarg, etc.
if (isa<PHINode>(I1) || isa<PHINode>(I2) ||
isa<TerminatorInst>(I1) || isa<TerminatorInst>(I2) ||
- isa<LandingPadInst>(I1) || isa<LandingPadInst>(I2) ||
+ I1->isEHPad() || I2->isEHPad() ||
isa<AllocaInst>(I1) || isa<AllocaInst>(I2) ||
I1->mayHaveSideEffects() || I2->mayHaveSideEffects() ||
I1->mayReadOrWriteMemory() || I2->mayReadOrWriteMemory() ||
Modified: llvm/trunk/tools/bugpoint/CrashDebugger.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/bugpoint/CrashDebugger.cpp?rev=245487&r1=245486&r2=245487&view=diff
==============================================================================
--- llvm/trunk/tools/bugpoint/CrashDebugger.cpp (original)
+++ llvm/trunk/tools/bugpoint/CrashDebugger.cpp Wed Aug 19 14:54:02 2015
@@ -470,7 +470,7 @@ bool ReduceCrashingInstructions::TestIns
for (BasicBlock::iterator I = FI->begin(), E = FI->end(); I != E;) {
Instruction *Inst = I++;
if (!Instructions.count(Inst) && !isa<TerminatorInst>(Inst) &&
- !isa<LandingPadInst>(Inst)) {
+ !Inst->isEHPad()) {
if (!Inst->getType()->isVoidTy())
Inst->replaceAllUsesWith(UndefValue::get(Inst->getType()));
Inst->eraseFromParent();
More information about the llvm-commits
mailing list