diff options
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/CMakeLists.txt | 25 | ||||
-rw-r--r-- | lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt | 7 | ||||
-rw-r--r-- | lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp | 45 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZAsmPrinter.cpp | 4 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZISelLowering.cpp | 1 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZInstrInfo.td | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZSubtarget.cpp | 2 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZTargetMachine.cpp | 10 | ||||
-rw-r--r-- | lib/Target/SystemZ/SystemZTargetMachine.h | 3 | ||||
-rw-r--r-- | lib/Target/SystemZ/TargetInfo/CMakeLists.txt | 8 | ||||
-rw-r--r-- | lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp | 2 |
12 files changed, 68 insertions, 43 deletions
diff --git a/lib/Target/SystemZ/CMakeLists.txt b/lib/Target/SystemZ/CMakeLists.txt index f4bdbd8..7c09c0e 100644 --- a/lib/Target/SystemZ/CMakeLists.txt +++ b/lib/Target/SystemZ/CMakeLists.txt @@ -1,11 +1,12 @@ set(LLVM_TARGET_DEFINITIONS SystemZ.td) -tablegen(SystemZGenRegisterInfo.inc -gen-register-info) -tablegen(SystemZGenInstrInfo.inc -gen-instr-info) -tablegen(SystemZGenAsmWriter.inc -gen-asm-writer) -tablegen(SystemZGenDAGISel.inc -gen-dag-isel) -tablegen(SystemZGenCallingConv.inc -gen-callingconv) -tablegen(SystemZGenSubtargetInfo.inc -gen-subtarget) +llvm_tablegen(SystemZGenRegisterInfo.inc -gen-register-info) +llvm_tablegen(SystemZGenInstrInfo.inc -gen-instr-info) +llvm_tablegen(SystemZGenAsmWriter.inc -gen-asm-writer) +llvm_tablegen(SystemZGenDAGISel.inc -gen-dag-isel) +llvm_tablegen(SystemZGenCallingConv.inc -gen-callingconv) +llvm_tablegen(SystemZGenSubtargetInfo.inc -gen-subtarget) +add_public_tablegen_target(SystemZCommonTableGen) add_llvm_target(SystemZCodeGen SystemZAsmPrinter.cpp @@ -19,5 +20,17 @@ add_llvm_target(SystemZCodeGen SystemZSelectionDAGInfo.cpp ) +add_llvm_library_dependencies(LLVMSystemZCodeGen + LLVMAsmPrinter + LLVMCodeGen + LLVMCore + LLVMMC + LLVMSelectionDAG + LLVMSupport + LLVMSystemZDesc + LLVMSystemZInfo + LLVMTarget + ) + add_subdirectory(TargetInfo) add_subdirectory(MCTargetDesc) diff --git a/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt b/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt index 2ac9016..822df09 100644 --- a/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt +++ b/lib/Target/SystemZ/MCTargetDesc/CMakeLists.txt @@ -3,5 +3,12 @@ add_llvm_library(LLVMSystemZDesc SystemZMCAsmInfo.cpp ) +add_llvm_library_dependencies(LLVMSystemZDesc + LLVMMC + LLVMSystemZInfo + ) + +add_dependencies(LLVMSystemZDesc SystemZCommonTableGen) + # Hack: we need to include 'main' target directory to grab private headers include_directories(${CMAKE_CURRENT_SOURCE_DIR}/.. ${CMAKE_CURRENT_BINARY_DIR}/..) diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp index 79c41d8..23fb1e0 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp @@ -13,10 +13,11 @@ #include "SystemZMCTargetDesc.h" #include "SystemZMCAsmInfo.h" +#include "llvm/MC/MCCodeGenInfo.h" #include "llvm/MC/MCInstrInfo.h" #include "llvm/MC/MCRegisterInfo.h" #include "llvm/MC/MCSubtargetInfo.h" -#include "llvm/Target/TargetRegistry.h" +#include "llvm/Support/TargetRegistry.h" #define GET_INSTRINFO_MC_DESC #include "SystemZGenInstrInfo.inc" @@ -35,22 +36,12 @@ static MCInstrInfo *createSystemZMCInstrInfo() { return X; } -extern "C" void LLVMInitializeSystemZMCInstrInfo() { - TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, - createSystemZMCInstrInfo); -} - static MCRegisterInfo *createSystemZMCRegisterInfo(StringRef TT) { MCRegisterInfo *X = new MCRegisterInfo(); InitSystemZMCRegisterInfo(X, 0); return X; } -extern "C" void LLVMInitializeSystemZMCRegisterInfo() { - TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, - createSystemZMCRegisterInfo); -} - static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, StringRef CPU, StringRef FS) { @@ -59,24 +50,32 @@ static MCSubtargetInfo *createSystemZMCSubtargetInfo(StringRef TT, return X; } -extern "C" void LLVMInitializeSystemZMCSubtargetInfo() { - TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, - createSystemZMCSubtargetInfo); -} - -extern "C" void LLVMInitializeSystemZMCAsmInfo() { - RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget); -} - -MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM) { +static MCCodeGenInfo *createSystemZMCCodeGenInfo(StringRef TT, Reloc::Model RM, + CodeModel::Model CM) { MCCodeGenInfo *X = new MCCodeGenInfo(); if (RM == Reloc::Default) RM = Reloc::Static; - X->InitMCCodeGenInfo(RM); + X->InitMCCodeGenInfo(RM, CM); return X; } -extern "C" void LLVMInitializeSystemZMCCodeGenInfo() { +extern "C" void LLVMInitializeSystemZTargetMC() { + // Register the MC asm info. + RegisterMCAsmInfo<SystemZMCAsmInfo> X(TheSystemZTarget); + + // Register the MC codegen info. TargetRegistry::RegisterMCCodeGenInfo(TheSystemZTarget, createSystemZMCCodeGenInfo); + + // Register the MC instruction info. + TargetRegistry::RegisterMCInstrInfo(TheSystemZTarget, + createSystemZMCInstrInfo); + + // Register the MC register info. + TargetRegistry::RegisterMCRegInfo(TheSystemZTarget, + createSystemZMCRegisterInfo); + + // Register the MC subtarget info. + TargetRegistry::RegisterMCSubtargetInfo(TheSystemZTarget, + createSystemZMCSubtargetInfo); } diff --git a/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/lib/Target/SystemZ/SystemZAsmPrinter.cpp index fd4d8b7..43dcdfc 100644 --- a/lib/Target/SystemZ/SystemZAsmPrinter.cpp +++ b/lib/Target/SystemZ/SystemZAsmPrinter.cpp @@ -28,10 +28,8 @@ #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCSymbol.h" #include "llvm/Target/Mangler.h" -#include "llvm/Target/TargetData.h" -#include "llvm/Target/TargetLoweringObjectFile.h" -#include "llvm/Target/TargetRegistry.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Support/TargetRegistry.h" #include "llvm/Support/raw_ostream.h" using namespace llvm; diff --git a/lib/Target/SystemZ/SystemZISelLowering.cpp b/lib/Target/SystemZ/SystemZISelLowering.cpp index 871c297..48ca99f 100644 --- a/lib/Target/SystemZ/SystemZISelLowering.cpp +++ b/lib/Target/SystemZ/SystemZISelLowering.cpp @@ -81,6 +81,7 @@ SystemZTargetLowering::SystemZTargetLowering(SystemZTargetMachine &tm) : setSchedulingPreference(Sched::RegPressure); setBooleanContents(ZeroOrOneBooleanContent); + setBooleanVectorContents(ZeroOrOneBooleanContent); // FIXME: Is this correct? setOperationAction(ISD::BR_JT, MVT::Other, Expand); setOperationAction(ISD::BRCOND, MVT::Other, Expand); diff --git a/lib/Target/SystemZ/SystemZInstrInfo.cpp b/lib/Target/SystemZ/SystemZInstrInfo.cpp index 99e2730..5f3dd80 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -21,8 +21,8 @@ #include "llvm/CodeGen/MachineInstrBuilder.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/PseudoSourceValue.h" -#include "llvm/Target/TargetRegistry.h" #include "llvm/Support/ErrorHandling.h" +#include "llvm/Support/TargetRegistry.h" #define GET_INSTRINFO_CTOR #include "SystemZGenInstrInfo.inc" diff --git a/lib/Target/SystemZ/SystemZInstrInfo.td b/lib/Target/SystemZ/SystemZInstrInfo.td index 11a39fc..580d65b 100644 --- a/lib/Target/SystemZ/SystemZInstrInfo.td +++ b/lib/Target/SystemZ/SystemZInstrInfo.td @@ -478,7 +478,7 @@ def MOV64rmm : RSYI<0x04EB, "lmg\t{$from, $to, $dst}", []>; -let isReMaterializable = 1, isAsCheapAsAMove = 1, +let isReMaterializable = 1, neverHasSideEffects = 1, isAsCheapAsAMove = 1, Constraints = "$src = $dst" in { def MOV64Pr0_even : Pseudo<(outs GR64P:$dst), (ins GR64P:$src), "lhi\t${dst:subreg_even}, 0", diff --git a/lib/Target/SystemZ/SystemZSubtarget.cpp b/lib/Target/SystemZ/SystemZSubtarget.cpp index b3ed066..0845510 100644 --- a/lib/Target/SystemZ/SystemZSubtarget.cpp +++ b/lib/Target/SystemZ/SystemZSubtarget.cpp @@ -15,7 +15,7 @@ #include "SystemZ.h" #include "llvm/GlobalValue.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetRegistry.h" +#include "llvm/Support/TargetRegistry.h" #define GET_SUBTARGETINFO_TARGET_DESC #define GET_SUBTARGETINFO_CTOR diff --git a/lib/Target/SystemZ/SystemZTargetMachine.cpp b/lib/Target/SystemZ/SystemZTargetMachine.cpp index afa455e..e390f06 100644 --- a/lib/Target/SystemZ/SystemZTargetMachine.cpp +++ b/lib/Target/SystemZ/SystemZTargetMachine.cpp @@ -10,7 +10,7 @@ #include "SystemZTargetMachine.h" #include "SystemZ.h" #include "llvm/PassManager.h" -#include "llvm/Target/TargetRegistry.h" +#include "llvm/Support/TargetRegistry.h" using namespace llvm; extern "C" void LLVMInitializeSystemZTarget() { @@ -21,10 +21,10 @@ extern "C" void LLVMInitializeSystemZTarget() { /// SystemZTargetMachine ctor - Create an ILP64 architecture model /// SystemZTargetMachine::SystemZTargetMachine(const Target &T, - StringRef TT, - StringRef CPU, - StringRef FS, Reloc::Model RM) - : LLVMTargetMachine(T, TT, CPU, FS, RM), + StringRef TT, StringRef CPU, + StringRef FS, Reloc::Model RM, + CodeModel::Model CM) + : LLVMTargetMachine(T, TT, CPU, FS, RM, CM), Subtarget(TT, CPU, FS), DataLayout("E-p:64:64:64-i8:8:16-i16:16:16-i32:32:32-i64:64:64-f32:32:32" "-f64:64:64-f128:128:128-a0:16:16-n32:64"), diff --git a/lib/Target/SystemZ/SystemZTargetMachine.h b/lib/Target/SystemZ/SystemZTargetMachine.h index 9008b80..43dce4b 100644 --- a/lib/Target/SystemZ/SystemZTargetMachine.h +++ b/lib/Target/SystemZ/SystemZTargetMachine.h @@ -38,7 +38,8 @@ class SystemZTargetMachine : public LLVMTargetMachine { SystemZFrameLowering FrameLowering; public: SystemZTargetMachine(const Target &T, StringRef TT, - StringRef CPU, StringRef FS, Reloc::Model RM); + StringRef CPU, StringRef FS, + Reloc::Model RM, CodeModel::Model CM); virtual const TargetFrameLowering *getFrameLowering() const { return &FrameLowering; diff --git a/lib/Target/SystemZ/TargetInfo/CMakeLists.txt b/lib/Target/SystemZ/TargetInfo/CMakeLists.txt index 743d8d3..3180708 100644 --- a/lib/Target/SystemZ/TargetInfo/CMakeLists.txt +++ b/lib/Target/SystemZ/TargetInfo/CMakeLists.txt @@ -4,4 +4,10 @@ add_llvm_library(LLVMSystemZInfo SystemZTargetInfo.cpp ) -add_dependencies(LLVMSystemZInfo SystemZCodeGenTable_gen) +add_llvm_library_dependencies(LLVMSystemZInfo + LLVMMC + LLVMSupport + LLVMTarget + ) + +add_dependencies(LLVMSystemZInfo SystemZCommonTableGen) diff --git a/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp b/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp index 8272b11..da99282 100644 --- a/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp +++ b/lib/Target/SystemZ/TargetInfo/SystemZTargetInfo.cpp @@ -9,7 +9,7 @@ #include "SystemZ.h" #include "llvm/Module.h" -#include "llvm/Target/TargetRegistry.h" +#include "llvm/Support/TargetRegistry.h" using namespace llvm; Target llvm::TheSystemZTarget; |