summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
diff options
context:
space:
mode:
authorClement Courbet <courbet@google.com>2018-06-19 11:28:59 +0000
committerClement Courbet <courbet@google.com>2018-06-19 11:28:59 +0000
commit44b4c54e2698657d57ffcbbd9c26cb88c1a2cce9 (patch)
treeb4c67389f321642047335b0e4d21f352d9c3e664 /llvm/tools/llvm-exegesis/llvm-exegesis.cpp
parent46751785ee474bedf6e607913beb9e5104783237 (diff)
downloadbcm5719-llvm-44b4c54e2698657d57ffcbbd9c26cb88c1a2cce9.tar.gz
bcm5719-llvm-44b4c54e2698657d57ffcbbd9c26cb88c1a2cce9.zip
Re-land r335038 "[llvm-exegesis] A mechanism to add target-specific functionality.""
Fix typo: LLVM_NATIVE_ARCH -> LLVM_EXEGESIS_NATIVE_ARCH. llvm-svn: 335041
Diffstat (limited to 'llvm/tools/llvm-exegesis/llvm-exegesis.cpp')
-rw-r--r--llvm/tools/llvm-exegesis/llvm-exegesis.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
index 7e2caf3198e..2ac92965a96 100644
--- a/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
+++ b/llvm/tools/llvm-exegesis/llvm-exegesis.cpp
@@ -86,6 +86,10 @@ namespace exegesis {
static llvm::ExitOnError ExitOnErr;
+#ifdef LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET
+void LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET();
+#endif
+
static unsigned GetOpcodeOrDie(const llvm::MCInstrInfo &MCInstrInfo) {
if (OpcodeName.empty() && (OpcodeIndex == 0))
llvm::report_fatal_error(
@@ -120,6 +124,9 @@ void benchmarkMain() {
llvm::InitializeNativeTarget();
llvm::InitializeNativeTargetAsmPrinter();
+#ifdef LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET
+ LLVM_EXEGESIS_INITIALIZE_NATIVE_TARGET();
+#endif
// FIXME: Target-specific filter.
X86Filter Filter;
OpenPOWER on IntegriCloud