[llvm] cc781a4 - [MLGO] Fix build error concerning ScalarShape.
Jacob Hegna via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 16:52:47 PDT 2023
Author: Jacob Hegna
Date: 2023-04-27T23:52:36Z
New Revision: cc781a4e27fb1128b43feb69ef364ed7110f558e
URL: https://github.com/llvm/llvm-project/commit/cc781a4e27fb1128b43feb69ef364ed7110f558e
DIFF: https://github.com/llvm/llvm-project/commit/cc781a4e27fb1128b43feb69ef364ed7110f558e.diff
LOG: [MLGO] Fix build error concerning ScalarShape.
Added:
Modified:
llvm/include/llvm/Analysis/InlineModelFeatureMaps.h
llvm/lib/Analysis/MLInlineAdvisor.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/InlineModelFeatureMaps.h b/llvm/include/llvm/Analysis/InlineModelFeatureMaps.h
index 5523962085af..8633731876e1 100644
--- a/llvm/include/llvm/Analysis/InlineModelFeatureMaps.h
+++ b/llvm/include/llvm/Analysis/InlineModelFeatureMaps.h
@@ -18,7 +18,7 @@
namespace llvm {
-const std::vector<int64_t> ScalarShape;
+static const std::vector<int64_t> ScalarShape{1};
// List of cost features. A "cost" feature is a summand of the heuristic-based
// inline cost, and we define them separately to preserve the original heuristic
diff --git a/llvm/lib/Analysis/MLInlineAdvisor.cpp b/llvm/lib/Analysis/MLInlineAdvisor.cpp
index e7faad51a501..0660a9993b6d 100644
--- a/llvm/lib/Analysis/MLInlineAdvisor.cpp
+++ b/llvm/lib/Analysis/MLInlineAdvisor.cpp
@@ -46,8 +46,6 @@ static cl::opt<bool>
InteractiveIncludeDefault("inliner-interactive-include-default", cl::Hidden,
cl::desc(InclDefaultMsg));
-const std::vector<int64_t> ScalarShape = {1};
-
#if defined(LLVM_HAVE_TF_AOT_INLINERSIZEMODEL)
// codegen-ed file
#include "InlinerSizeModel.h" // NOLINT
More information about the llvm-commits
mailing list