Skip to content

Commit 4ab9c13

Browse files
committed
[gn] port c253e5c (RISCV llvm-exegesis)
See here for the additional tblgen deps: #128767 (comment)
1 parent 074c2c6 commit 4ab9c13

File tree

2 files changed

+12
-2
lines changed
  • llvm/utils/gn/secondary/llvm

2 files changed

+12
-2
lines changed

llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ tablegen("RISCVGenCompressInstEmitter") {
1717
tablegen("RISCVGenMacroFusion") {
1818
visibility = [
1919
":LLVMRISCVCodeGen",
20+
"//llvm/tools/llvm-exegesis/lib/RISCV",
2021
"//llvm/unittests/Target/RISCV:RISCVTests",
2122
]
2223
args = [ "-gen-macro-fusion-pred" ]
@@ -69,7 +70,10 @@ tablegen("RISCVGenPostLegalizeGICombiner") {
6970
}
7071

7172
tablegen("RISCVGenRegisterBank") {
72-
visibility = [ ":LLVMRISCVCodeGen" ]
73+
visibility = [
74+
":LLVMRISCVCodeGen",
75+
"//llvm/tools/llvm-exegesis/lib/RISCV",
76+
]
7377
args = [ "-gen-register-bank" ]
7478
td_file = "RISCV.td"
7579
}

llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/RISCV/BUILD.gn

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,14 @@ static_library("RISCV") {
1515

1616
# Exegesis reaches inside the Target/RISCV tablegen internals and must
1717
# depend on these Target/RISCV-internal build targets.
18+
"//llvm/lib/Target/RISCV:RISCVGenMacroFusion",
19+
"//llvm/lib/Target/RISCV:RISCVGenRegisterBank",
1820
"//llvm/lib/Target/RISCV/MCTargetDesc",
1921
]
20-
sources = [ "Target.cpp" ]
22+
sources = [
23+
"RISCVExegesisPostprocessing.cpp",
24+
"RISCVExegesisPreprocessing.cpp",
25+
"Target.cpp",
26+
]
2127
include_dirs = [ "//llvm/lib/Target/RISCV" ]
2228
}

0 commit comments

Comments
 (0)