[llvm] 4ab9c13 - [gn] port c253e5c9917b (RISCV llvm-exegesis)

Nico Weber via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 18:01:30 PST 2025


Author: Nico Weber
Date: 2025-02-28T21:01:22-05:00
New Revision: 4ab9c13ba2a6f505fb1b72ae33753902ae9f81e8

URL: https://github.com/llvm/llvm-project/commit/4ab9c13ba2a6f505fb1b72ae33753902ae9f81e8
DIFF: https://github.com/llvm/llvm-project/commit/4ab9c13ba2a6f505fb1b72ae33753902ae9f81e8.diff

LOG: [gn] port c253e5c9917b (RISCV llvm-exegesis)

See here for the additional tblgen deps:
https://github.com/llvm/llvm-project/pull/128767#issuecomment-2691834320

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
index f18e40a2a5744..1d76bc9e8974c 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Target/RISCV/BUILD.gn
@@ -17,6 +17,7 @@ tablegen("RISCVGenCompressInstEmitter") {
 tablegen("RISCVGenMacroFusion") {
   visibility = [
     ":LLVMRISCVCodeGen",
+    "//llvm/tools/llvm-exegesis/lib/RISCV",
     "//llvm/unittests/Target/RISCV:RISCVTests",
   ]
   args = [ "-gen-macro-fusion-pred" ]
@@ -69,7 +70,10 @@ tablegen("RISCVGenPostLegalizeGICombiner") {
 }
 
 tablegen("RISCVGenRegisterBank") {
-  visibility = [ ":LLVMRISCVCodeGen" ]
+  visibility = [
+    ":LLVMRISCVCodeGen",
+    "//llvm/tools/llvm-exegesis/lib/RISCV",
+  ]
   args = [ "-gen-register-bank" ]
   td_file = "RISCV.td"
 }

diff  --git a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/RISCV/BUILD.gn b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/RISCV/BUILD.gn
index 7c6cdd0a34d23..cfffa6daaefa7 100644
--- a/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/RISCV/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/tools/llvm-exegesis/lib/RISCV/BUILD.gn
@@ -15,8 +15,14 @@ static_library("RISCV") {
 
     # Exegesis reaches inside the Target/RISCV tablegen internals and must
     # depend on these Target/RISCV-internal build targets.
+    "//llvm/lib/Target/RISCV:RISCVGenMacroFusion",
+    "//llvm/lib/Target/RISCV:RISCVGenRegisterBank",
     "//llvm/lib/Target/RISCV/MCTargetDesc",
   ]
-  sources = [ "Target.cpp" ]
+  sources = [
+    "RISCVExegesisPostprocessing.cpp",
+    "RISCVExegesisPreprocessing.cpp",
+    "Target.cpp",
+  ]
   include_dirs = [ "//llvm/lib/Target/RISCV" ]
 }


        


More information about the llvm-commits mailing list