summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 5ea45357864..f4c6a289b80 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -805,26 +805,6 @@ void BranchInst::swapSuccessors() {
MDNode::get(ProfileData->getContext(), Ops));
}
-bool BranchInst::getBranchWeights(uint64_t &TrueWeight,
- uint64_t &FalseWeight) const {
- if (isUnconditional())
- return false;
-
- auto *MD = getMetadata(LLVMContext::MD_prof);
- if (!MD || MD->getNumOperands() != 3)
- return false;
-
- auto *TrueCI = dyn_cast<ConstantInt>(MD->getOperand(1));
- auto *FalseCI = dyn_cast<ConstantInt>(MD->getOperand(2));
- if (!TrueCI || !FalseCI)
- return false;
-
- TrueWeight = TrueCI->getValue().getZExtValue();
- FalseWeight = FalseCI->getValue().getZExtValue();
-
- return true;
-}
-
BasicBlock *BranchInst::getSuccessorV(unsigned idx) const {
return getSuccessor(idx);
}
OpenPOWER on IntegriCloud