diff options
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index dd83168..941e41f 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -4141,23 +4141,6 @@ void SwitchInst::growOperands() { growHungoffUses(ReservedSpace); } -MDNode *SwitchInstProfUpdateWrapper::buildProfBranchWeightsMD() { - assert(Changed && "called only if metadata has changed"); - - if (!Weights) - return nullptr; - - assert(SI.getNumSuccessors() == Weights->size() && - "num of prof branch_weights must accord with num of successors"); - - bool AllZeroes = all_of(*Weights, [](uint32_t W) { return W == 0; }); - - if (AllZeroes || Weights->size() < 2) - return nullptr; - - return MDBuilder(SI.getParent()->getContext()).createBranchWeights(*Weights); -} - void SwitchInstProfUpdateWrapper::init() { MDNode *ProfileData = getBranchWeightMDNode(SI); if (!ProfileData) |