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("RISCVGenMCPseudoLowering") {
24 visibility = [ ":LLVMRISCVCodeGen" ]
25 args = [ "-gen-pseudo-lowering" ]
29 static_library("LLVMRISCVCodeGen") {
31 ":RISCVGenCompressInstEmitter",
33 ":RISCVGenMCPseudoLowering",
37 "//llvm/include/llvm/Config:llvm-config",
39 "//llvm/lib/CodeGen/AsmPrinter",
40 "//llvm/lib/CodeGen/SelectionDAG",
46 include_dirs = [ "." ]
48 "RISCVAsmPrinter.cpp",
49 "RISCVExpandPseudoInsts.cpp",
50 "RISCVFrameLowering.cpp",
51 "RISCVISelDAGToDAG.cpp",
52 "RISCVISelLowering.cpp",
54 "RISCVMCInstLower.cpp",
55 "RISCVMergeBaseOffset.cpp",
56 "RISCVRegisterInfo.cpp",
58 "RISCVTargetMachine.cpp",
59 "RISCVTargetObjectFile.cpp",
60 "RISCVTargetTransformInfo.cpp",
64 # This is a bit different from most build files: Due to this group
65 # having the directory's name, "//llvm/lib/Target/RISCV" will refer to this
66 # target, which pulls in the code in this directory *and all subdirectories*.
67 # For most other directories, "//llvm/lib/Foo" only pulls in the code directly
68 # in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this