1 import("//llvm/utils/TableGen/tablegen.gni")
3 # RISCV is the only target that has a "compress instr emitter", and it's
4 # a bit strange in that it defines static functions depending on which
5 # defines are set. Instead of housing these functions in one library,
6 # various libraries include the generated .inc file with different defines set.
7 tablegen("RISCVGenCompressInstEmitter") {
13 args = [ "-gen-compress-inst-emitter" ]
17 tablegen("RISCVGenDAGISel") {
18 visibility = [ ":LLVMRISCVCodeGen" ]
19 args = [ "-gen-dag-isel" ]
23 tablegen("RISCVGenGlobalISel") {
24 visibility = [ ":LLVMRISCVCodeGen" ]
25 args = [ "-gen-global-isel" ]
29 tablegen("RISCVGenMCPseudoLowering") {
30 visibility = [ ":LLVMRISCVCodeGen" ]
31 args = [ "-gen-pseudo-lowering" ]
35 tablegen("RISCVGenRegisterBank") {
36 visibility = [ ":LLVMRISCVCodeGen" ]
37 args = [ "-gen-register-bank" ]
41 static_library("LLVMRISCVCodeGen") {
43 ":RISCVGenCompressInstEmitter",
45 ":RISCVGenGlobalISel",
46 ":RISCVGenMCPseudoLowering",
47 ":RISCVGenRegisterBank",
51 "//llvm/include/llvm/Config:llvm-config",
53 "//llvm/lib/CodeGen/AsmPrinter",
54 "//llvm/lib/CodeGen/SelectionDAG",
60 include_dirs = [ "." ]
62 "RISCVAsmPrinter.cpp",
63 "RISCVCallLowering.cpp",
64 "RISCVExpandPseudoInsts.cpp",
65 "RISCVFrameLowering.cpp",
66 "RISCVISelDAGToDAG.cpp",
67 "RISCVISelLowering.cpp",
69 "RISCVInstructionSelector.cpp",
70 "RISCVLegalizerInfo.cpp",
71 "RISCVMCInstLower.cpp",
72 "RISCVMergeBaseOffset.cpp",
73 "RISCVRegisterBankInfo.cpp",
74 "RISCVRegisterInfo.cpp",
76 "RISCVTargetMachine.cpp",
77 "RISCVTargetObjectFile.cpp",
78 "RISCVTargetTransformInfo.cpp",
82 # This is a bit different from most build files: Due to this group
83 # having the directory's name, "//llvm/lib/Target/RISCV" will refer to this
84 # target, which pulls in the code in this directory *and all subdirectories*.
85 # For most other directories, "//llvm/lib/Foo" only pulls in the code directly
86 # in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this