[llvm] [mlgo] Fix bad merge of #156120 with 0082cf41de11 (PR #156134)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 19:36:00 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Mircea Trofin (mtrofin)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/156134.diff


1 Files Affected:

- (modified) llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp (+2-3) 


``````````diff
diff --git a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
index a51f62fe65776..67e38ab8b35aa 100644
--- a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
@@ -281,7 +281,7 @@ TrainingLogger::TrainingLogger(StringRef LogFileName,
                                const std::vector<TensorSpec> &FeatureMap)
     : LogFileName(LogFileName), MUTR(MUTR), FeatureMap(FeatureMap) {
   // The first output is the inlining decision.
-  std::vector<TensorSpec> FT(getFeatureMap().begin(), getFeatureMap().end());
+  std::vector<TensorSpec> FT(FeatureMap.begin(), FeatureMap.end());
 
   if (MUTR)
     append_range(FT, MUTR->extraOutputsForLoggingSpecs());
@@ -307,8 +307,7 @@ void TrainingLogger::logInlineEvent(const InlineEvent &Event,
                                     const MLModelRunner &ModelRunner) {
   L->startObservation();
   size_t CurrentFeature = 0;
-  size_t FeatureMapSize = getFeatureMap().size();
-  for (; CurrentFeature < FeatureMapSize; ++CurrentFeature)
+  for (; CurrentFeature < FeatureMap.size(); ++CurrentFeature)
     L->logTensorValue(CurrentFeature,
                       reinterpret_cast<const char *>(
                           ModelRunner.getTensorUntyped(CurrentFeature)));

``````````

</details>


https://github.com/llvm/llvm-project/pull/156134


More information about the llvm-commits mailing list