Update prebuilt Clang to r416183b from Android.
https://android.googlesource.com/platform/prebuilts/clang/host/
linux-x86/+/06a71ddac05c22edb2d10b590e1769b3f8619bef
clang 12.0.5 (based on r416183b) from build 7284624.
Change-Id: I277a316abcf47307562d8b748b84870f31a72866
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
diff --git a/linux-x64/clang/include/llvm/Analysis/InlineModelFeatureMaps.h b/linux-x64/clang/include/llvm/Analysis/InlineModelFeatureMaps.h
new file mode 100644
index 0000000..8da442c
--- /dev/null
+++ b/linux-x64/clang/include/llvm/Analysis/InlineModelFeatureMaps.h
@@ -0,0 +1,70 @@
+//===- InlineModelFeatureMaps.h - common model runner defs ------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+
+#ifndef LLVM_ANALYSIS_INLINEMODELFEATUREMAPS_H
+#define LLVM_ANALYSIS_INLINEMODELFEATUREMAPS_H
+
+#include <array>
+#include <string>
+#include <vector>
+
+namespace llvm {
+
+// List of features. Each feature is defined through a triple:
+// - the name of an enum member, which will be the feature index
+// - a textual name, used for Tensorflow model binding (so it needs to match the
+// names used by the Tensorflow model)
+// - a documentation description. Currently, that is not used anywhere
+// programmatically, and serves as workaround to inability of inserting comments
+// in macros.
+#define INLINE_FEATURE_ITERATOR(M) \
+ M(CalleeBasicBlockCount, "callee_basic_block_count", \
+ "number of basic blocks of the callee") \
+ M(CallSiteHeight, "callsite_height", \
+ "position of the call site in the original call graph - measured from " \
+ "the farthest SCC") \
+ M(NodeCount, "node_count", \
+ "total current number of defined functions in the module") \
+ M(NrCtantParams, "nr_ctant_params", \
+ "number of parameters in the call site that are constants") \
+ M(CostEstimate, "cost_estimate", "total cost estimate (threshold - free)") \
+ M(EdgeCount, "edge_count", \
+ "number of module-internal users of the caller, +1 if the caller is " \
+ "exposed externally") \
+ M(CallerUsers, "caller_users", \
+ "number of blocks reached from a conditional instruction, in the caller") \
+ M(CallerConditionallyExecutedBlocks, "caller_conditionally_executed_blocks", \
+ "number of blocks reached from a conditional instruction, in the caller") \
+ M(CallerBasicBlockCount, "caller_basic_block_count", \
+ "number of basic blocks in the caller") \
+ M(CalleeConditionallyExecutedBlocks, "callee_conditionally_executed_blocks", \
+ "number of blocks reached from a conditional instruction, in the callee") \
+ M(CalleeUsers, "callee_users", \
+ "number of blocks reached from a conditional instruction, in the callee")
+
+enum class FeatureIndex : size_t {
+#define POPULATE_INDICES(INDEX_NAME, NAME, COMMENT) INDEX_NAME,
+ INLINE_FEATURE_ITERATOR(POPULATE_INDICES)
+#undef POPULATE_INDICES
+ NumberOfFeatures
+};
+
+constexpr size_t NumberOfFeatures =
+ static_cast<size_t>(FeatureIndex::NumberOfFeatures);
+
+extern const std::array<std::string, NumberOfFeatures> FeatureNameMap;
+
+extern const char *const DecisionName;
+extern const char *const DefaultDecisionName;
+extern const char *const RewardName;
+
+using InlineFeatures = std::vector<int64_t>;
+
+} // namespace llvm
+#endif // LLVM_ANALYSIS_INLINEMODELFEATUREMAPS_H