mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Remove no-longer-useful dyn_casts and pals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149307 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7750c3fc9f
commit
27b5658aff
@ -276,10 +276,7 @@ namespace {
|
|||||||
UnwindDestPHIValues.push_back(PHI->getIncomingValueForBlock(InvokeBB));
|
UnwindDestPHIValues.push_back(PHI->getIncomingValueForBlock(InvokeBB));
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: With the new EH, this if/dyn_cast should be a 'cast'.
|
CallerLPad = cast<LandingPadInst>(I);
|
||||||
if (LandingPadInst *LPI = dyn_cast<LandingPadInst>(I)) {
|
|
||||||
CallerLPad = LPI;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The outer unwind destination is the target of unwind edges
|
/// The outer unwind destination is the target of unwind edges
|
||||||
@ -507,13 +504,12 @@ static bool HandleCallsInBlockInlinedThroughInvoke(BasicBlock *BB,
|
|||||||
for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E; ) {
|
for (BasicBlock::iterator BBI = BB->begin(), E = BB->end(); BBI != E; ) {
|
||||||
Instruction *I = BBI++;
|
Instruction *I = BBI++;
|
||||||
|
|
||||||
if (LPI) // FIXME: New EH - This won't be NULL in the new EH.
|
if (LandingPadInst *L = dyn_cast<LandingPadInst>(I)) {
|
||||||
if (LandingPadInst *L = dyn_cast<LandingPadInst>(I)) {
|
unsigned NumClauses = LPI->getNumClauses();
|
||||||
unsigned NumClauses = LPI->getNumClauses();
|
L->reserveClauses(NumClauses);
|
||||||
L->reserveClauses(NumClauses);
|
for (unsigned i = 0; i != NumClauses; ++i)
|
||||||
for (unsigned i = 0; i != NumClauses; ++i)
|
L->addClause(LPI->getClause(i));
|
||||||
L->addClause(LPI->getClause(i));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// We only need to check for function calls: inlined invoke
|
// We only need to check for function calls: inlined invoke
|
||||||
// instructions require no special handling.
|
// instructions require no special handling.
|
||||||
@ -930,11 +926,8 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) {
|
|||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) {
|
if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) {
|
||||||
const BasicBlock *BB = II->getUnwindDest();
|
const BasicBlock *BB = II->getUnwindDest();
|
||||||
// FIXME: This 'if/dyn_cast' here should become a normal 'cast' once
|
const LandingPadInst *LP = BB->getLandingPadInst();
|
||||||
// the new EH system is in place.
|
CalleePersonality = LP->getPersonalityFn();
|
||||||
if (const LandingPadInst *LP =
|
|
||||||
dyn_cast<LandingPadInst>(BB->getFirstNonPHI()))
|
|
||||||
CalleePersonality = LP->getPersonalityFn();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -946,11 +939,7 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) {
|
|||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) {
|
if (const InvokeInst *II = dyn_cast<InvokeInst>(I->getTerminator())) {
|
||||||
const BasicBlock *BB = II->getUnwindDest();
|
const BasicBlock *BB = II->getUnwindDest();
|
||||||
// FIXME: This 'isa' here should become go away once the new EH system
|
const LandingPadInst *LP = BB->getLandingPadInst();
|
||||||
// is in place.
|
|
||||||
if (!isa<LandingPadInst>(BB->getFirstNonPHI()))
|
|
||||||
continue;
|
|
||||||
const LandingPadInst *LP = cast<LandingPadInst>(BB->getFirstNonPHI());
|
|
||||||
|
|
||||||
// If the personality functions match, then we can perform the
|
// If the personality functions match, then we can perform the
|
||||||
// inlining. Otherwise, we can't inline.
|
// inlining. Otherwise, we can't inline.
|
||||||
|
Loading…
Reference in New Issue
Block a user