[llvm] 0082cf4 - [MLGO] Fix Development Build post f4665b

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 12:08:40 PDT 2025


Author: Aiden Grossman
Date: 2025-08-29T19:08:33Z
New Revision: 0082cf41de117025dd842cb641c83f64ce2d43e7

URL: https://github.com/llvm/llvm-project/commit/0082cf41de117025dd842cb641c83f64ce2d43e7
DIFF: https://github.com/llvm/llvm-project/commit/0082cf41de117025dd842cb641c83f64ce2d43e7.diff

LOG: [MLGO] Fix Development Build post f4665b

This broke the development build which is only used by us and build on
the bots.

Added: 
    

Modified: 
    llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
index 790e00e1b3b06..ce2d8b654bf21 100644
--- a/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/DevelopmentModeInlineAdvisor.cpp
@@ -260,7 +260,7 @@ static const std::vector<TensorSpec> TrainingOnlyFeatures{
 
 static const std::vector<TensorSpec> getInputFeatures() {
   std::vector<TensorSpec> InputSpecs;
-  for (const auto &Feature : FeatureMap)
+  for (const auto &Feature : getFeatureMap())
     InputSpecs.push_back(TensorSpec(TFFeedPrefix + Feature.name(), Feature));
   append_range(InputSpecs, TrainingOnlyFeatures);
   return InputSpecs;
@@ -272,7 +272,7 @@ TrainingLogger::TrainingLogger(StringRef LogFileName,
                                const ModelUnderTrainingRunner *MUTR)
     : LogFileName(LogFileName), MUTR(MUTR) {
   // The first output is the inlining decision.
-  std::vector<TensorSpec> FT(FeatureMap.begin(), FeatureMap.end());
+  std::vector<TensorSpec> FT(getFeatureMap().begin(), getFeatureMap().end());
 
   if (MUTR)
     append_range(FT, MUTR->extraOutputsForLoggingSpecs());
@@ -298,7 +298,7 @@ void TrainingLogger::logInlineEvent(const InlineEvent &Event,
                                     const MLModelRunner &ModelRunner) {
   L->startObservation();
   size_t CurrentFeature = 0;
-  size_t FeatureMapSize = FeatureMap.size();
+  size_t FeatureMapSize = getFeatureMap().size();
   for (; CurrentFeature < FeatureMapSize; ++CurrentFeature)
     L->logTensorValue(CurrentFeature,
                       reinterpret_cast<const char *>(


        


More information about the llvm-commits mailing list