blob: fc4adddc149baf0f3133829a65df57a08ec59432 [file] [log] [blame]
Michael Kupersteine86aa9a2015-02-01 16:15:07 +00001set(LLVM_TARGET_DEFINITIONS X86.td)
2
3tablegen(LLVM X86GenRegisterInfo.inc -gen-register-info)
4tablegen(LLVM X86GenDisassemblerTables.inc -gen-disassembler)
5tablegen(LLVM X86GenInstrInfo.inc -gen-instr-info)
6tablegen(LLVM X86GenAsmWriter.inc -gen-asm-writer)
7tablegen(LLVM X86GenAsmWriter1.inc -gen-asm-writer -asmwriternum=1)
8tablegen(LLVM X86GenAsmMatcher.inc -gen-asm-matcher)
9tablegen(LLVM X86GenDAGISel.inc -gen-dag-isel)
10tablegen(LLVM X86GenFastISel.inc -gen-fast-isel)
11tablegen(LLVM X86GenCallingConv.inc -gen-callingconv)
12tablegen(LLVM X86GenSubtargetInfo.inc -gen-subtarget)
Ayman Musa850fc972017-03-07 08:11:19 +000013tablegen(LLVM X86GenEVEX2VEXTables.inc -gen-x86-EVEX2VEX-tables)
Igor Bregerb4442f32017-02-10 07:05:56 +000014if(LLVM_BUILD_GLOBAL_ISEL)
15 tablegen(LLVM X86GenRegisterBank.inc -gen-register-bank)
Igor Bregerf7359d82017-02-22 12:25:09 +000016 tablegen(LLVM X86GenGlobalISel.inc -gen-global-isel)
Igor Bregerb4442f32017-02-10 07:05:56 +000017endif()
18
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000019add_public_tablegen_target(X86CommonTableGen)
20
Zvi Rackover76dbf262016-11-15 06:34:33 +000021# Add GlobalISel files if the build option was enabled.
22set(GLOBAL_ISEL_FILES
23 X86CallLowering.cpp
Igor Bregerb4442f32017-02-10 07:05:56 +000024 X86LegalizerInfo.cpp
25 X86RegisterBankInfo.cpp
Igor Bregerf7359d82017-02-22 12:25:09 +000026 X86InstructionSelector.cpp
Zvi Rackover76dbf262016-11-15 06:34:33 +000027 )
28
29if(LLVM_BUILD_GLOBAL_ISEL)
30 set(GLOBAL_ISEL_BUILD_FILES ${GLOBAL_ISEL_FILES})
31else()
32 set(GLOBAL_ISEL_BUILD_FILES "")
33 set(LLVM_OPTIONAL_SOURCES LLVMGlobalISel ${GLOBAL_ISEL_FILES})
34endif()
35
36
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000037set(sources
38 X86AsmPrinter.cpp
Michael Kuperstein13fbd452015-02-01 16:56:04 +000039 X86CallFrameOptimization.cpp
Quentin Colombet494eb602015-05-22 18:10:47 +000040 X86ExpandPseudo.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000041 X86FastISel.cpp
Michael Kuperstein85de98f2016-06-28 17:11:15 +000042 X86FixupBWInsts.cpp
43 X86FixupLEAs.cpp
Michael Kuperstein3e3652a2016-07-07 22:50:23 +000044 X86FixupSetCC.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000045 X86FloatingPoint.cpp
46 X86FrameLowering.cpp
47 X86ISelDAGToDAG.cpp
48 X86ISelLowering.cpp
David L Kreitzer01a057a2016-10-14 18:20:41 +000049 X86InterleavedAccess.cpp
Vyacheslav Klochkov6daefcf2016-08-11 22:07:33 +000050 X86InstrFMA3Info.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000051 X86InstrInfo.cpp
Gadi Haber19c4fc52016-12-28 10:12:48 +000052 X86EvexToVex.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000053 X86MCInstLower.cpp
54 X86MachineFunctionInfo.cpp
Evandro Menezes94edf022017-02-01 02:54:34 +000055 X86MacroFusion.cpp
Michael Kuperstein85de98f2016-06-28 17:11:15 +000056 X86OptimizeLEAs.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000057 X86PadShortFunction.cpp
58 X86RegisterInfo.cpp
59 X86SelectionDAGInfo.cpp
Craig Topper69653af2015-12-31 22:40:45 +000060 X86ShuffleDecodeConstantPool.cpp
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000061 X86Subtarget.cpp
62 X86TargetMachine.cpp
63 X86TargetObjectFile.cpp
64 X86TargetTransformInfo.cpp
65 X86VZeroUpper.cpp
Hans Wennborg8eb336c2016-05-18 16:10:17 +000066 X86WinAllocaExpander.cpp
Michael Kuperstein85de98f2016-06-28 17:11:15 +000067 X86WinEHState.cpp
Oren Ben Simhon489d6ef2016-11-17 09:59:40 +000068 X86CallingConv.cpp
Zvi Rackover76dbf262016-11-15 06:34:33 +000069 ${GLOBAL_ISEL_BUILD_FILES}
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000070 )
71
Michael Kupersteine86aa9a2015-02-01 16:15:07 +000072add_llvm_target(X86CodeGen ${sources})
73
74add_subdirectory(AsmParser)
75add_subdirectory(Disassembler)
76add_subdirectory(InstPrinter)
77add_subdirectory(MCTargetDesc)
78add_subdirectory(TargetInfo)
79add_subdirectory(Utils)