[llvm] f76b7f2 - [MLGO] Fix build break as result of new InstructionCost (D91174)
Mircea Trofin via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 11 21:08:37 PST 2020
Author: Mircea Trofin
Date: 2020-12-11T20:28:39-08:00
New Revision: f76b7f22f085fbf9f2585923f7a3a0558d75964b
URL: https://github.com/llvm/llvm-project/commit/f76b7f22f085fbf9f2585923f7a3a0558d75964b
DIFF: https://github.com/llvm/llvm-project/commit/f76b7f22f085fbf9f2585923f7a3a0558d75964b.diff
LOG: [MLGO] Fix build break as result of new InstructionCost (D91174)
Added:
Modified:
llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
index 2213cd8598b0..3c90e82fb952 100644
--- a/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
+++ b/llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp
@@ -130,8 +130,8 @@ size_t getSize(Function &F, TargetTransformInfo &TTI) {
size_t Ret = 0;
for (const auto &BB : F)
for (const auto &I : BB)
- Ret += TTI.getInstructionCost(
- &I, TargetTransformInfo::TargetCostKind::TCK_CodeSize);
+ Ret += *(TTI.getInstructionCost(
+ &I, TargetTransformInfo::TargetCostKind::TCK_CodeSize).getValue());
return Ret;
}
More information about the llvm-commits
mailing list