[llvm] deef5b8 - [llvm][ir][NFC] Clean up "if after return" in ProfDataUtils.cpp
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 13:27:54 PDT 2022
Author: Paul Kirth
Date: 2022-08-26T20:27:39Z
New Revision: deef5b8c0d6907a31fb50aacfb1086cb2f018d78
URL: https://github.com/llvm/llvm-project/commit/deef5b8c0d6907a31fb50aacfb1086cb2f018d78
DIFF: https://github.com/llvm/llvm-project/commit/deef5b8c0d6907a31fb50aacfb1086cb2f018d78.diff
LOG: [llvm][ir][NFC] Clean up "if after return" in ProfDataUtils.cpp
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D131236
Added:
Modified:
llvm/lib/IR/ProfDataUtils.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/ProfDataUtils.cpp b/llvm/lib/IR/ProfDataUtils.cpp
index b312b4231ced6..66c645c54fea7 100644
--- a/llvm/lib/IR/ProfDataUtils.cpp
+++ b/llvm/lib/IR/ProfDataUtils.cpp
@@ -149,8 +149,10 @@ bool extractProfTotalWeight(const MDNode *ProfileData, uint64_t &TotalVal) {
TotalVal += V->getValue().getZExtValue();
}
return true;
- } else if (ProfDataName->getString().equals("VP") &&
- ProfileData->getNumOperands() > 3) {
+ }
+
+ if (ProfDataName->getString().equals("VP") &&
+ ProfileData->getNumOperands() > 3) {
TotalVal = mdconst::dyn_extract<ConstantInt>(ProfileData->getOperand(2))
->getValue()
.getZExtValue();
More information about the llvm-commits
mailing list