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 &FeatureMap) : LogFileName(LogFileName), MUTR(MUTR), FeatureMap(FeatureMap) { // The first output is the inlining decision. - std::vector FT(getFeatureMap().begin(), getFeatureMap().end()); + std::vector 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( ModelRunner.getTensorUntyped(CurrentFeature)));