summaryrefslogtreecommitdiffstats
path: root/lib/Analysis/BranchProbabilityInfo.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
committerdim <dim@FreeBSD.org>2015-01-18 16:17:27 +0000
commit081af4da16b9046c019ca40f64b1fb7ee8c6dca1 (patch)
tree4abb9cbeecc7901726dd0b4a37369596c852e9ef /lib/Analysis/BranchProbabilityInfo.cpp
parent3c7e7a1538a873b0d3b012ef8811969ac4552c2a (diff)
downloadFreeBSD-src-081af4da16b9046c019ca40f64b1fb7ee8c6dca1.zip
FreeBSD-src-081af4da16b9046c019ca40f64b1fb7ee8c6dca1.tar.gz
Vendor import of llvm RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1):
https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc1@226102
Diffstat (limited to 'lib/Analysis/BranchProbabilityInfo.cpp')
-rw-r--r--lib/Analysis/BranchProbabilityInfo.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Analysis/BranchProbabilityInfo.cpp b/lib/Analysis/BranchProbabilityInfo.cpp
index bbd8750..2b39d47 100644
--- a/lib/Analysis/BranchProbabilityInfo.cpp
+++ b/lib/Analysis/BranchProbabilityInfo.cpp
@@ -196,7 +196,8 @@ bool BranchProbabilityInfo::calcMetadataWeights(BasicBlock *BB) {
SmallVector<uint32_t, 2> Weights;
Weights.reserve(TI->getNumSuccessors());
for (unsigned i = 1, e = WeightsNode->getNumOperands(); i != e; ++i) {
- ConstantInt *Weight = dyn_cast<ConstantInt>(WeightsNode->getOperand(i));
+ ConstantInt *Weight =
+ mdconst::dyn_extract<ConstantInt>(WeightsNode->getOperand(i));
if (!Weight)
return false;
Weights.push_back(
OpenPOWER on IntegriCloud