Skip to content

Conversation

mtrofin
Copy link
Member

@mtrofin mtrofin commented Aug 30, 2025

No description provided.

@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label Aug 30, 2025
@mtrofin mtrofin merged commit c168ce2 into llvm:main Aug 30, 2025
7 of 11 checks passed
@mtrofin mtrofin deleted the fix-mlgo2 branch August 30, 2025 02:35
@llvmbot
Copy link
Member

llvmbot commented Aug 30, 2025

@llvm/pr-subscribers-llvm-analysis

Author: Mircea Trofin (mtrofin)

Changes

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

1 Files Affected:

  • (modified) llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp (+2-3)
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)));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants