From 708a91a10366f0aa8f2b3912dd8e047ca1a66e5b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 18 Dec 2015 21:23:32 +0000 Subject: Revert "Enhance BranchProbabilityInfo::calcUnreachableHeuristics for InvokeInst" This reverts commit r256028. It broke: LLVM :: CodeGen/Mips/eh.ll LLVM :: CodeGen/Mips/insn-zero-size-bb.ll llvm-svn: 256032 --- llvm/lib/Analysis/BranchProbabilityInfo.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'llvm/lib/Analysis/BranchProbabilityInfo.cpp') diff --git a/llvm/lib/Analysis/BranchProbabilityInfo.cpp b/llvm/lib/Analysis/BranchProbabilityInfo.cpp index a0d6123b583..6cdf43a06a9 100644 --- a/llvm/lib/Analysis/BranchProbabilityInfo.cpp +++ b/llvm/lib/Analysis/BranchProbabilityInfo.cpp @@ -147,16 +147,6 @@ bool BranchProbabilityInfo::calcUnreachableHeuristics(BasicBlock *BB) { if (TI->getNumSuccessors() == 1 || UnreachableEdges.empty()) return false; - // If the terminator is an InvokeInst, check only the normal destination block - // as the unwind edge of InvokeInst is also very unlikely taken. - if (auto *II = dyn_cast(TI)) - if (PostDominatedByUnreachable.count(II->getNormalDest())) { - PostDominatedByUnreachable.insert(BB); - // Return false here so that edge weights for InvokeInst could be decided - // in calcInvokeHeuristics(). - return false; - } - uint32_t UnreachableWeight = std::max(UR_TAKEN_WEIGHT / (unsigned)UnreachableEdges.size(), MIN_WEIGHT); for (SmallVectorImpl::iterator I = UnreachableEdges.begin(), -- cgit v1.2.3