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

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 19:35:30 PDT 2025


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

None

>From a2c437fcd320ced1b60b2ac977d0e85a59a6b96e Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Sat, 30 Aug 2025 02:30:01 +0000
Subject: [PATCH] [mlgo] Fix bad merge of #156120 with
 0082cf41de117025dd842cb641c83f64ce2d43e7

---
 llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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)));



More information about the llvm-commits mailing list