llvm.org GIT mirror llvm / 059c128
[gn build] Add some llvm/tools: llvm-exegesis, llvm-extract, llvm-link Also add build file for dependency llvm/lib/ExecutionEngine/MCJIT. The exegesis stuff is pretty hairy and knows a lot about Target internals (in general, not specifically in the GN build). I put the llvm-tblgen -gen-exegesis call in llvm/tools/llvm-exegesis/lib/X86, instead of in llvm/lib/Target/X86 where it is in CMake land, and asked on D52932 why it's in that place in the CMake build. Needed for check-llvm. Differential Revision: https://reviews.llvm.org/D56167 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350184 91177308-0d34-0410-b5e6-96231b3b80d8 Nico Weber 9 months ago
7 changed file(s) with 122 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
44 deps = [
55 "//clang/test",
66 "//lld/test",
7 "//llvm/tools/llvm-exegesis",
8 "//llvm/tools/llvm-extract",
9 "//llvm/tools/llvm-link",
710 "//llvm/tools/llvm-rc",
811 "//llvm/tools/llvm-rtdyld",
912 "//llvm/tools/llvm-undname",
0 static_library("MCJIT") {
1 output_name = "LLVMMCJIT"
2 deps = [
3 "//llvm/lib/ExecutionEngine",
4 "//llvm/lib/ExecutionEngine/RuntimeDyld",
5 "//llvm/lib/IR",
6 "//llvm/lib/Object",
7 "//llvm/lib/Support",
8 "//llvm/lib/Target",
9 ]
10 sources = [
11 "MCJIT.cpp",
12 ]
13 }
0 executable("llvm-exegesis") {
1 deps = [
2 "lib",
3 "//llvm/lib/CodeGen",
4 "//llvm/lib/ExecutionEngine",
5 "//llvm/lib/ExecutionEngine/MCJIT",
6 "//llvm/lib/MC",
7 "//llvm/lib/Object",
8 "//llvm/lib/Support",
9 "//llvm/lib/Target:NativeTarget",
10 ]
11 sources = [
12 "llvm-exegesis.cpp",
13 ]
14 }
0 import("//llvm/lib/Target/targets.gni")
1
2 static_library("lib") {
3 output_name = "LLVMExegesis"
4 deps = [
5 "//llvm/lib/Analysis",
6 "//llvm/lib/CodeGen",
7 "//llvm/lib/ExecutionEngine",
8 "//llvm/lib/ExecutionEngine/MCJIT",
9 "//llvm/lib/IR",
10 "//llvm/lib/MC",
11 "//llvm/lib/Object",
12 "//llvm/lib/ObjectYAML",
13 "//llvm/lib/Support",
14 ]
15 sources = [
16 "Analysis.cpp",
17 "Assembler.cpp",
18 "BenchmarkResult.cpp",
19 "BenchmarkRunner.cpp",
20 "Clustering.cpp",
21 "CodeTemplate.cpp",
22 "Latency.cpp",
23 "LlvmState.cpp",
24 "MCInstrDescView.cpp",
25 "PerfHelper.cpp",
26 "RegisterAliasing.cpp",
27 "RegisterValue.cpp",
28 "SnippetGenerator.cpp",
29 "Target.cpp",
30 "Uops.cpp",
31 ]
32
33 # FIXME: Add this once llvm/lib/Target/AArch64 exists.
34 #if (llvm_build_AArch64) {
35 # deps += [ "AArch64" ]
36 #}
37 if (llvm_build_X86) {
38 deps += [ "X86" ]
39 }
40 }
0 import("//llvm/utils/TableGen/tablegen.gni")
1
2 tablegen("X86GenExegesis") {
3 args = [ "-gen-exegesis" ]
4 td_file = "//llvm/lib/Target/X86/X86.td"
5 }
6
7 static_library("X86") {
8 output_name = "LLVMExegesisX86"
9 deps = [
10 ":X86GenExegesis",
11
12 # Exegesis reaches inside the Target/X86 tablegen internals and must
13 # depend on this Target/X86-internal build target.
14 "//llvm/lib/Target/X86/MCTargetDesc",
15 ]
16 sources = [
17 "Target.cpp",
18 ]
19 include_dirs = [ "//llvm/lib/Target/X86" ]
20 }
0 executable("llvm-extract") {
1 deps = [
2 "//llvm/lib/Bitcode/Writer",
3 "//llvm/lib/IR",
4 "//llvm/lib/IRReader",
5 "//llvm/lib/Support",
6 "//llvm/lib/Transforms/IPO",
7 ]
8 sources = [
9 "llvm-extract.cpp",
10 ]
11 }
0 executable("llvm-link") {
1 deps = [
2 "//llvm/lib/Bitcode/Reader",
3 "//llvm/lib/Bitcode/Writer",
4 "//llvm/lib/IR",
5 "//llvm/lib/IRReader",
6 "//llvm/lib/Linker",
7 "//llvm/lib/Object",
8 "//llvm/lib/Support",
9 "//llvm/lib/Transforms/IPO",
10 "//llvm/lib/Transforms/Utils",
11 ]
12 sources = [
13 "llvm-link.cpp",
14 ]
15 }