[llvm] [BOLT] Only link and initialize supported targets (PR #127509)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 17 08:12:40 PST 2025
https://github.com/nikic updated https://github.com/llvm/llvm-project/pull/127509
>From 3a1a7b039f54de1fb4fb3fa2fd8513cac3b1a958 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Mon, 17 Feb 2025 16:30:13 +0100
Subject: [PATCH 1/2] [BOLT] Only link and initialize supported targets
Bolt currently links and initializes all LLVM targets. This
substantially increased the binary size, and link time if LTO is
used.
Instead, only link the targets specified by BOLT_TARGETS_TO_BUILD.
We also have to only initialize those targets, so generate a
TargetConfig.def file with the necessary information. The way the
initialization is done mirrors what llvm-exegesis does.
This reduces llvm-bolt size from 137MB to 78MB for me.
---
bolt/CMakeLists.txt | 8 +++++++
bolt/include/bolt/Core/TargetConfig.def.in | 23 +++++++++++++++++++
bolt/tools/binary-analysis/CMakeLists.txt | 2 +-
.../tools/binary-analysis/binary-analysis.cpp | 16 +++++++------
bolt/tools/driver/CMakeLists.txt | 2 +-
bolt/tools/driver/llvm-bolt.cpp | 16 +++++++------
bolt/tools/heatmap/CMakeLists.txt | 2 +-
bolt/tools/heatmap/heatmap.cpp | 16 +++++++------
bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt | 2 +-
.../llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp | 15 +++++++-----
bolt/unittests/Core/BinaryContext.cpp | 15 +++++++-----
bolt/unittests/Core/CMakeLists.txt | 2 +-
bolt/unittests/Core/MCPlusBuilder.cpp | 15 +++++++-----
bolt/unittests/Core/MemoryMaps.cpp | 15 +++++++-----
14 files changed, 99 insertions(+), 50 deletions(-)
create mode 100644 bolt/include/bolt/Core/TargetConfig.def.in
diff --git a/bolt/CMakeLists.txt b/bolt/CMakeLists.txt
index 04db160b64b05..f5ffa81227064 100644
--- a/bolt/CMakeLists.txt
+++ b/bolt/CMakeLists.txt
@@ -202,3 +202,11 @@ endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc.in
${CMAKE_CURRENT_BINARY_DIR}/include/bolt/RuntimeLibs/RuntimeLibraryVariables.inc @ONLY)
+
+set(BOLT_ENUM_TARGETS "")
+foreach(t ${BOLT_TARGETS_TO_BUILD})
+ set(BOLT_ENUM_TARGETS "${BOLT_ENUM_TARGETS}BOLT_TARGET(${t})\n")
+endforeach(t)
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/bolt/Core/TargetConfig.def.in
+ ${CMAKE_CURRENT_BINARY_DIR}/include/bolt/Core/TargetConfig.def @ONLY)
diff --git a/bolt/include/bolt/Core/TargetConfig.def.in b/bolt/include/bolt/Core/TargetConfig.def.in
new file mode 100644
index 0000000000000..a52ebd92b56fd
--- /dev/null
+++ b/bolt/include/bolt/Core/TargetConfig.def.in
@@ -0,0 +1,23 @@
+//===-- TargetConfig.def.in - Information about available targets ---------===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is configured by the build system to define the available bolt
+// targets.
+//
+// The variant of this file not ending with .in has been autogenerated by the
+// LLVM build. Do not edit!
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef BOLT_TARGET
+# error Please define the macro BOLT_TARGET(TargetName)
+#endif
+
+ at BOLT_ENUM_TARGETS@
+
+#undef BOLT_TARGET
diff --git a/bolt/tools/binary-analysis/CMakeLists.txt b/bolt/tools/binary-analysis/CMakeLists.txt
index 841fc5b371185..29f224e0f66ff 100644
--- a/bolt/tools/binary-analysis/CMakeLists.txt
+++ b/bolt/tools/binary-analysis/CMakeLists.txt
@@ -1,5 +1,5 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ ${BOLT_TARGETS_TO_BUILD}
MC
Object
Support
diff --git a/bolt/tools/binary-analysis/binary-analysis.cpp b/bolt/tools/binary-analysis/binary-analysis.cpp
index b03fee3e025ae..779a097ff010d 100644
--- a/bolt/tools/binary-analysis/binary-analysis.cpp
+++ b/bolt/tools/binary-analysis/binary-analysis.cpp
@@ -88,13 +88,15 @@ int main(int argc, char **argv) {
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
// Initialize targets and assembly printers/parsers.
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
-
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
ParseCommandLine(argc, argv);
diff --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt
index 9bf9ff85edc7b..4b3c7416de974 100644
--- a/bolt/tools/driver/CMakeLists.txt
+++ b/bolt/tools/driver/CMakeLists.txt
@@ -1,5 +1,5 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ ${BOLT_TARGETS_TO_BUILD}
MC
Object
Support
diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp
index f151cf5f63fc5..0f29ea0d3c531 100644
--- a/bolt/tools/driver/llvm-bolt.cpp
+++ b/bolt/tools/driver/llvm-bolt.cpp
@@ -183,13 +183,15 @@ int main(int argc, char **argv) {
std::string ToolPath = llvm::sys::fs::getMainExecutable(argv[0], nullptr);
// Initialize targets and assembly printers/parsers.
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
-
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
ToolName = argv[0];
diff --git a/bolt/tools/heatmap/CMakeLists.txt b/bolt/tools/heatmap/CMakeLists.txt
index acddc7a50e8b1..c5d3f67413929 100644
--- a/bolt/tools/heatmap/CMakeLists.txt
+++ b/bolt/tools/heatmap/CMakeLists.txt
@@ -1,5 +1,5 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ ${BOLT_TARGETS_TO_BUILD}
MC
Object
Support
diff --git a/bolt/tools/heatmap/heatmap.cpp b/bolt/tools/heatmap/heatmap.cpp
index 3bb9f2ce7491d..4011548b5c7d0 100644
--- a/bolt/tools/heatmap/heatmap.cpp
+++ b/bolt/tools/heatmap/heatmap.cpp
@@ -76,13 +76,15 @@ int main(int argc, char **argv) {
opts::OutputFilename = "-";
// Initialize targets and assembly printers/parsers.
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
-
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
ToolName = argv[0];
std::string ToolPath = GetExecutablePath(argv[0]);
diff --git a/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt b/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt
index f21285f634bad..7eaacb74a9da6 100644
--- a/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt
+++ b/bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt
@@ -1,5 +1,5 @@
set(LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
+ ${BOLT_TARGETS_TO_BUILD}
)
add_llvm_fuzzer(llvm-bolt-fuzzer
diff --git a/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp b/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
index bdb5768a91da1..3c64e30653120 100644
--- a/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
+++ b/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
@@ -58,13 +58,16 @@ extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
char ***argv) {
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
+ // Initialize targets and assembly printers/parsers.
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#include "bolt/Core/TargetConfig.def"
return 0;
}
diff --git a/bolt/unittests/Core/BinaryContext.cpp b/bolt/unittests/Core/BinaryContext.cpp
index 0fefa1b83c3c2..0a58b079c3a5b 100644
--- a/bolt/unittests/Core/BinaryContext.cpp
+++ b/bolt/unittests/Core/BinaryContext.cpp
@@ -27,12 +27,15 @@ struct BinaryContextTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
}
void prepareElf() {
diff --git a/bolt/unittests/Core/CMakeLists.txt b/bolt/unittests/Core/CMakeLists.txt
index 208cf6ced7358..8ac88b701ea05 100644
--- a/bolt/unittests/Core/CMakeLists.txt
+++ b/bolt/unittests/Core/CMakeLists.txt
@@ -2,7 +2,7 @@ set(LLVM_LINK_COMPONENTS
DebugInfoDWARF
Object
MC
- ${LLVM_TARGETS_TO_BUILD}
+ ${BOLT_TARGETS_TO_BUILD}
)
add_bolt_unittest(CoreTests
diff --git a/bolt/unittests/Core/MCPlusBuilder.cpp b/bolt/unittests/Core/MCPlusBuilder.cpp
index 5488cae366284..06c5598da7f57 100644
--- a/bolt/unittests/Core/MCPlusBuilder.cpp
+++ b/bolt/unittests/Core/MCPlusBuilder.cpp
@@ -37,12 +37,15 @@ struct MCPlusBuilderTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
}
void prepareElf() {
diff --git a/bolt/unittests/Core/MemoryMaps.cpp b/bolt/unittests/Core/MemoryMaps.cpp
index 06073d0a82e14..d823655e7a701 100644
--- a/bolt/unittests/Core/MemoryMaps.cpp
+++ b/bolt/unittests/Core/MemoryMaps.cpp
@@ -38,12 +38,15 @@ struct MemoryMapsTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
- llvm::InitializeAllTargetInfos();
- llvm::InitializeAllTargetMCs();
- llvm::InitializeAllAsmParsers();
- llvm::InitializeAllDisassemblers();
- llvm::InitializeAllTargets();
- llvm::InitializeAllAsmPrinters();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
+
+#include "bolt/Core/TargetConfig.def"
}
void prepareElf() {
>From e306962d6ea25ffab0524e02fa9e14365e8c0607 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov at redhat.com>
Date: Mon, 17 Feb 2025 17:12:23 +0100
Subject: [PATCH 2/2] clang-format
---
bolt/tools/binary-analysis/binary-analysis.cpp | 12 ++++++------
bolt/tools/driver/llvm-bolt.cpp | 12 ++++++------
bolt/tools/heatmap/heatmap.cpp | 12 ++++++------
bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp | 12 ++++++------
bolt/unittests/Core/BinaryContext.cpp | 14 +++++++-------
bolt/unittests/Core/MCPlusBuilder.cpp | 14 +++++++-------
bolt/unittests/Core/MemoryMaps.cpp | 14 +++++++-------
7 files changed, 45 insertions(+), 45 deletions(-)
diff --git a/bolt/tools/binary-analysis/binary-analysis.cpp b/bolt/tools/binary-analysis/binary-analysis.cpp
index 779a097ff010d..0e3584eeedd18 100644
--- a/bolt/tools/binary-analysis/binary-analysis.cpp
+++ b/bolt/tools/binary-analysis/binary-analysis.cpp
@@ -88,12 +88,12 @@ int main(int argc, char **argv) {
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
// Initialize targets and assembly printers/parsers.
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
diff --git a/bolt/tools/driver/llvm-bolt.cpp b/bolt/tools/driver/llvm-bolt.cpp
index 0f29ea0d3c531..6b6714723fa3b 100644
--- a/bolt/tools/driver/llvm-bolt.cpp
+++ b/bolt/tools/driver/llvm-bolt.cpp
@@ -183,12 +183,12 @@ int main(int argc, char **argv) {
std::string ToolPath = llvm::sys::fs::getMainExecutable(argv[0], nullptr);
// Initialize targets and assembly printers/parsers.
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
diff --git a/bolt/tools/heatmap/heatmap.cpp b/bolt/tools/heatmap/heatmap.cpp
index 4011548b5c7d0..6add36cc6715f 100644
--- a/bolt/tools/heatmap/heatmap.cpp
+++ b/bolt/tools/heatmap/heatmap.cpp
@@ -76,12 +76,12 @@ int main(int argc, char **argv) {
opts::OutputFilename = "-";
// Initialize targets and assembly printers/parsers.
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
diff --git a/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp b/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
index 3c64e30653120..09049788aebec 100644
--- a/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
+++ b/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp
@@ -59,12 +59,12 @@ extern "C" int LLVMFuzzerTestOneInput(const char *Data, size_t Size) {
extern "C" LLVM_ATTRIBUTE_USED int LLVMFuzzerInitialize(int *argc,
char ***argv) {
// Initialize targets and assembly printers/parsers.
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
diff --git a/bolt/unittests/Core/BinaryContext.cpp b/bolt/unittests/Core/BinaryContext.cpp
index 0a58b079c3a5b..09d16966334da 100644
--- a/bolt/unittests/Core/BinaryContext.cpp
+++ b/bolt/unittests/Core/BinaryContext.cpp
@@ -27,13 +27,13 @@ struct BinaryContextTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
- LLVMInitialize##target##AsmPrinter();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
}
diff --git a/bolt/unittests/Core/MCPlusBuilder.cpp b/bolt/unittests/Core/MCPlusBuilder.cpp
index 06c5598da7f57..d367eb07f7767 100644
--- a/bolt/unittests/Core/MCPlusBuilder.cpp
+++ b/bolt/unittests/Core/MCPlusBuilder.cpp
@@ -37,13 +37,13 @@ struct MCPlusBuilderTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
- LLVMInitialize##target##AsmPrinter();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
}
diff --git a/bolt/unittests/Core/MemoryMaps.cpp b/bolt/unittests/Core/MemoryMaps.cpp
index d823655e7a701..2e1bc4d280aed 100644
--- a/bolt/unittests/Core/MemoryMaps.cpp
+++ b/bolt/unittests/Core/MemoryMaps.cpp
@@ -38,13 +38,13 @@ struct MemoryMapsTester : public testing::TestWithParam<Triple::ArchType> {
protected:
void initalizeLLVM() {
-#define BOLT_TARGET(target) \
- LLVMInitialize##target##TargetInfo(); \
- LLVMInitialize##target##TargetMC(); \
- LLVMInitialize##target##AsmParser(); \
- LLVMInitialize##target##Disassembler(); \
- LLVMInitialize##target##Target(); \
- LLVMInitialize##target##AsmPrinter();
+#define BOLT_TARGET(target) \
+ LLVMInitialize##target##TargetInfo(); \
+ LLVMInitialize##target##TargetMC(); \
+ LLVMInitialize##target##AsmParser(); \
+ LLVMInitialize##target##Disassembler(); \
+ LLVMInitialize##target##Target(); \
+ LLVMInitialize##target##AsmPrinter();
#include "bolt/Core/TargetConfig.def"
}
More information about the llvm-commits
mailing list