diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-18 21:23:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-12-18 21:23:32 +0000 |
commit | a4c2a53b4bea34190608c04a1474cdc638c7a478 (patch) | |
tree | 02ff4648a01ab5a46978dc22e99bfff394f5662d /lib | |
parent | b223cec87ddf00817049bc7307a9a5969b9095d1 (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/BranchProbabilityInfo.cpp | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/Analysis/BranchProbabilityInfo.cpp b/lib/Analysis/BranchProbabilityInfo.cpp index a0d6123b583..6cdf43a06a9 100644 --- a/lib/Analysis/BranchProbabilityInfo.cpp +++ b/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<InvokeInst>(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<unsigned>::iterator I = UnreachableEdges.begin(), |