From db82d2f33827dc44dc0076ad26a1a0f4638719c5 Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Fri, 10 Jul 2015 07:15:17 +0000 Subject: Revert the new EH instructions This reverts commits r241888-r241891, I didn't mean to commit them. llvm-svn: 241893 --- llvm/lib/Transforms/Utils/BasicBlockUtils.cpp | 5 ++--- llvm/lib/Transforms/Utils/Local.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Transforms/Utils') diff --git a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp index c761934162d..53471de6154 100644 --- a/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp +++ b/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp @@ -119,9 +119,8 @@ bool llvm::MergeBlockIntoPredecessor(BasicBlock *BB, DominatorTree *DT, // Don't break self-loops. if (PredBB == BB) return false; - // Don't break unwinding instructions. - if (PredBB->getTerminator()->isExceptional()) - return false; + // Don't break invokes. + if (isa(PredBB->getTerminator())) return false; succ_iterator SI(succ_begin(PredBB)), SE(succ_end(PredBB)); BasicBlock *OnlySucc = BB; diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp index e1788c9e287..56085579b61 100644 --- a/llvm/lib/Transforms/Utils/Local.cpp +++ b/llvm/lib/Transforms/Utils/Local.cpp @@ -283,9 +283,8 @@ bool llvm::isInstructionTriviallyDead(Instruction *I, const TargetLibraryInfo *TLI) { if (!I->use_empty() || isa(I)) return false; - // We don't want the landingpad-like instructions removed by anything this - // general. - if (I->isEHBlock()) + // We don't want the landingpad instruction removed by anything this general. + if (isa(I)) return false; // We don't want debug info removed by anything this general, unless -- cgit v1.2.3