diff options
Diffstat (limited to 'llvm/lib/Target')
26 files changed, 156 insertions, 28 deletions
diff --git a/llvm/lib/Target/ARM/ARMSubtarget.cpp b/llvm/lib/Target/ARM/ARMSubtarget.cpp index 694b31385b2..01acde0ffdb 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.cpp +++ b/llvm/lib/Target/ARM/ARMSubtarget.cpp @@ -12,11 +12,17 @@ //===----------------------------------------------------------------------===// #include "ARMSubtarget.h" -#include "ARMGenSubtarget.inc" #include "ARMBaseRegisterInfo.h" #include "llvm/GlobalValue.h" +#include "llvm/Target/TargetSubtarget.h" #include "llvm/Support/CommandLine.h" #include "llvm/ADT/SmallVector.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "ARMGenSubtarget.inc" + using namespace llvm; static cl::opt<bool> @@ -32,7 +38,8 @@ StrictAlign("arm-strict-align", cl::Hidden, ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool isT) - : ARMArchVersion(V4) + : ARMGenSubtargetInfo() + , ARMArchVersion(V4) , ARMProcFamily(Others) , ARMFPUType(None) , UseNEONForSinglePrecisionFP(false) @@ -130,6 +137,9 @@ ARMSubtarget::ARMSubtarget(const std::string &TT, const std::string &CPU, FSWithArch = FSWithArch + "," + FS; ParseSubtargetFeatures(FSWithArch, CPUString); + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(CPUString); + // After parsing Itineraries, set ItinData.IssueWidth. computeIssueWidth(); diff --git a/llvm/lib/Target/ARM/ARMSubtarget.h b/llvm/lib/Target/ARM/ARMSubtarget.h index 7c931730615..fbe83227315 100644 --- a/llvm/lib/Target/ARM/ARMSubtarget.h +++ b/llvm/lib/Target/ARM/ARMSubtarget.h @@ -19,10 +19,13 @@ #include "llvm/ADT/Triple.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "ARMGenSubtarget.inc" + namespace llvm { class GlobalValue; -class ARMSubtarget : public TargetSubtarget { +class ARMSubtarget : public ARMGenSubtargetInfo { protected: enum ARMArchEnum { V4, V4T, V5T, V5TE, V6, V6M, V6T2, V7A, V7M diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp index 7080327f1db..5ed2d312780 100644 --- a/llvm/lib/Target/Alpha/AlphaSubtarget.cpp +++ b/llvm/lib/Target/Alpha/AlphaSubtarget.cpp @@ -14,15 +14,24 @@ #include "AlphaSubtarget.h" #include "Alpha.h" #include "AlphaGenSubtarget.inc" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "AlphaGenSubtarget.inc" + using namespace llvm; AlphaSubtarget::AlphaSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) - : HasCT(false) { + : AlphaGenSubtargetInfo(), HasCT(false) { std::string CPUName = CPU; if (CPUName.empty()) CPUName = "generic"; // Parse features string. ParseSubtargetFeatures(FS, CPUName); + + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(CPUName); } diff --git a/llvm/lib/Target/Alpha/AlphaSubtarget.h b/llvm/lib/Target/Alpha/AlphaSubtarget.h index b1ccf26b180..0bd161c9e95 100644 --- a/llvm/lib/Target/Alpha/AlphaSubtarget.h +++ b/llvm/lib/Target/Alpha/AlphaSubtarget.h @@ -18,9 +18,12 @@ #include "llvm/MC/MCInstrItineraries.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "AlphaGenSubtarget.inc" + namespace llvm { -class AlphaSubtarget : public TargetSubtarget { +class AlphaSubtarget : public AlphaGenSubtargetInfo { protected: bool HasCT; diff --git a/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp b/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp index 50920264515..f0328e0724f 100644 --- a/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp +++ b/llvm/lib/Target/Blackfin/BlackfinSubtarget.cpp @@ -12,6 +12,10 @@ //===----------------------------------------------------------------------===// #include "BlackfinSubtarget.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC #include "BlackfinGenSubtarget.inc" using namespace llvm; @@ -19,7 +23,7 @@ using namespace llvm; BlackfinSubtarget::BlackfinSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) - : sdram(false), + : BlackfinGenSubtargetInfo(), sdram(false), icplb(false), wa_mi_shift(false), wa_csync(false), diff --git a/llvm/lib/Target/Blackfin/BlackfinSubtarget.h b/llvm/lib/Target/Blackfin/BlackfinSubtarget.h index a1a09ec4ec9..fecd035dcd9 100644 --- a/llvm/lib/Target/Blackfin/BlackfinSubtarget.h +++ b/llvm/lib/Target/Blackfin/BlackfinSubtarget.h @@ -17,9 +17,12 @@ #include "llvm/Target/TargetSubtarget.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "BlackfinGenSubtarget.inc" + namespace llvm { - class BlackfinSubtarget : public TargetSubtarget { + class BlackfinSubtarget : public BlackfinGenSubtargetInfo { bool sdram; bool icplb; bool wa_mi_shift; diff --git a/llvm/lib/Target/CellSPU/SPUSubtarget.cpp b/llvm/lib/Target/CellSPU/SPUSubtarget.cpp index a1a9f51b739..512876781ad 100644 --- a/llvm/lib/Target/CellSPU/SPUSubtarget.cpp +++ b/llvm/lib/Target/CellSPU/SPUSubtarget.cpp @@ -13,14 +13,19 @@ #include "SPUSubtarget.h" #include "SPU.h" -#include "SPUGenSubtarget.inc" #include "llvm/ADT/SmallVector.h" #include "SPURegisterInfo.h" +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "SPUGenSubtarget.inc" + using namespace llvm; SPUSubtarget::SPUSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) : + SPUGenSubtargetInfo(), StackAlignment(16), ProcDirective(SPU::DEFAULT_PROC), UseLargeMem(false) @@ -31,6 +36,9 @@ SPUSubtarget::SPUSubtarget(const std::string &TT, const std::string &CPU, // Parse features string. ParseSubtargetFeatures(FS, default_cpu); + + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(default_cpu); } /// SetJITMode - This is called to inform the subtarget info that we are diff --git a/llvm/lib/Target/CellSPU/SPUSubtarget.h b/llvm/lib/Target/CellSPU/SPUSubtarget.h index 69a60db2b93..2e5934bc275 100644 --- a/llvm/lib/Target/CellSPU/SPUSubtarget.h +++ b/llvm/lib/Target/CellSPU/SPUSubtarget.h @@ -18,6 +18,9 @@ #include "llvm/MC/MCInstrItineraries.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "SPUGenSubtarget.inc" + namespace llvm { class GlobalValue; @@ -28,7 +31,7 @@ namespace llvm { }; } - class SPUSubtarget : public TargetSubtarget { + class SPUSubtarget : public SPUGenSubtargetInfo { protected: /// stackAlignment - The minimum alignment known to hold of the stack frame /// on entry to the function and which must be maintained by every function. diff --git a/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp b/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp index 034b5ce49c1..0ba0bea4659 100644 --- a/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp +++ b/llvm/lib/Target/MBlaze/MBlazeSubtarget.cpp @@ -14,13 +14,19 @@ #include "MBlazeSubtarget.h" #include "MBlaze.h" #include "MBlazeRegisterInfo.h" -#include "MBlazeGenSubtarget.inc" #include "llvm/Support/CommandLine.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "MBlazeGenSubtarget.inc" + using namespace llvm; MBlazeSubtarget::MBlazeSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS): + MBlazeGenSubtargetInfo(), HasBarrel(false), HasDiv(false), HasMul(false), HasPatCmp(false), HasFPU(false), HasMul64(false), HasSqrt(false) { @@ -35,6 +41,9 @@ MBlazeSubtarget::MBlazeSubtarget(const std::string &TT, HasItin = CPUName != "mblaze"; DEBUG(dbgs() << "CPU " << CPUName << "(" << HasItin << ")\n"); + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(CPUName); + // Compute the issue width of the MBlaze itineraries computeIssueWidth(); } diff --git a/llvm/lib/Target/MBlaze/MBlazeSubtarget.h b/llvm/lib/Target/MBlaze/MBlazeSubtarget.h index f5e0b4ce9b3..63acee2e7ba 100644 --- a/llvm/lib/Target/MBlaze/MBlazeSubtarget.h +++ b/llvm/lib/Target/MBlaze/MBlazeSubtarget.h @@ -18,9 +18,12 @@ #include "llvm/MC/MCInstrItineraries.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "MBlazeGenSubtarget.inc" + namespace llvm { -class MBlazeSubtarget : public TargetSubtarget { +class MBlazeSubtarget : public MBlazeGenSubtargetInfo { protected: bool HasBarrel; diff --git a/llvm/lib/Target/MSP430/MSP430Subtarget.cpp b/llvm/lib/Target/MSP430/MSP430Subtarget.cpp index a257abe66db..4198d20a701 100644 --- a/llvm/lib/Target/MSP430/MSP430Subtarget.cpp +++ b/llvm/lib/Target/MSP430/MSP430Subtarget.cpp @@ -13,6 +13,10 @@ #include "MSP430Subtarget.h" #include "MSP430.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC #include "MSP430GenSubtarget.inc" using namespace llvm; diff --git a/llvm/lib/Target/MSP430/MSP430Subtarget.h b/llvm/lib/Target/MSP430/MSP430Subtarget.h index f36428a0e74..0a508e09d9c 100644 --- a/llvm/lib/Target/MSP430/MSP430Subtarget.h +++ b/llvm/lib/Target/MSP430/MSP430Subtarget.h @@ -16,11 +16,14 @@ #include "llvm/Target/TargetSubtarget.h" +#define GET_SUBTARGETINFO_HEADER +#include "MSP430GenSubtarget.inc" + #include <string> namespace llvm { -class MSP430Subtarget : public TargetSubtarget { +class MSP430Subtarget : public MSP430GenSubtargetInfo { bool ExtendedInsts; public: /// This constructor initializes the data members to match that diff --git a/llvm/lib/Target/Mips/MipsSubtarget.cpp b/llvm/lib/Target/Mips/MipsSubtarget.cpp index 306ea118927..9c69e0459d3 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.cpp +++ b/llvm/lib/Target/Mips/MipsSubtarget.cpp @@ -13,11 +13,17 @@ #include "MipsSubtarget.h" #include "Mips.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC #include "MipsGenSubtarget.inc" + using namespace llvm; MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool little) : + MipsGenSubtargetInfo(), MipsArchVersion(Mips1), MipsABI(O32), IsLittle(little), IsSingleFloat(false), IsFP64bit(false), IsGP64bit(false), HasVFPU(false), IsLinux(true), HasSEInReg(false), HasCondMov(false), HasMulDivAdd(false), HasMinMax(false), @@ -31,6 +37,9 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU, // Parse features string. ParseSubtargetFeatures(FS, CPUName); + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(CPUName); + // Is the target system Linux ? if (TT.find("linux") == std::string::npos) IsLinux = false; diff --git a/llvm/lib/Target/Mips/MipsSubtarget.h b/llvm/lib/Target/Mips/MipsSubtarget.h index 8acbf5bee94..2b7d98f5c52 100644 --- a/llvm/lib/Target/Mips/MipsSubtarget.h +++ b/llvm/lib/Target/Mips/MipsSubtarget.h @@ -18,9 +18,12 @@ #include "llvm/MC/MCInstrItineraries.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "MipsGenSubtarget.inc" + namespace llvm { -class MipsSubtarget : public TargetSubtarget { +class MipsSubtarget : public MipsGenSubtargetInfo { public: enum MipsABIEnum { diff --git a/llvm/lib/Target/PTX/PTXSubtarget.cpp b/llvm/lib/Target/PTX/PTXSubtarget.cpp index f8941b6bab3..b3c8eb6ac9d 100644 --- a/llvm/lib/Target/PTX/PTXSubtarget.cpp +++ b/llvm/lib/Target/PTX/PTXSubtarget.cpp @@ -14,11 +14,17 @@ #include "PTXSubtarget.h" #include "llvm/Support/ErrorHandling.h" +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "PTXGenSubtarget.inc" + using namespace llvm; PTXSubtarget::PTXSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool is64Bit) - : PTXTarget(PTX_COMPUTE_1_0), + : PTXGenSubtargetInfo(), + PTXTarget(PTX_COMPUTE_1_0), PTXVersion(PTX_VERSION_2_0), SupportsDouble(false), SupportsFMA(true), diff --git a/llvm/lib/Target/PTX/PTXSubtarget.h b/llvm/lib/Target/PTX/PTXSubtarget.h index 6d0337791b4..b7b27d6d534 100644 --- a/llvm/lib/Target/PTX/PTXSubtarget.h +++ b/llvm/lib/Target/PTX/PTXSubtarget.h @@ -16,8 +16,11 @@ #include "llvm/Target/TargetSubtarget.h" +#define GET_SUBTARGETINFO_HEADER +#include "PTXGenSubtarget.inc" + namespace llvm { - class PTXSubtarget : public TargetSubtarget { + class PTXSubtarget : public PTXGenSubtargetInfo { public: /** diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index bcc4c218c24..ef8386c4450 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -15,8 +15,13 @@ #include "PPC.h" #include "llvm/GlobalValue.h" #include "llvm/Target/TargetMachine.h" -#include "PPCGenSubtarget.inc" #include <cstdlib> + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "PPCGenSubtarget.inc" + using namespace llvm; #if defined(__APPLE__) @@ -59,7 +64,8 @@ static const char *GetCurrentPowerPCCPU() { PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool is64Bit) - : StackAlignment(16) + : PPCGenSubtargetInfo() + , StackAlignment(16) , DarwinDirective(PPC::DIR_NONE) , IsGigaProcessor(false) , Has64BitSupport(false) @@ -84,6 +90,9 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU, // Parse features string. ParseSubtargetFeatures(FS, CPUName); + // Initialize scheduling itinerary for the specified CPU. + InstrItins = getInstrItineraryForCPU(CPUName); + // If we are generating code for ppc64, verify that options make sense. if (is64Bit) { Has64BitSupport = true; diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.h b/llvm/lib/Target/PowerPC/PPCSubtarget.h index 55c3fef0154..b4e57584568 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.h +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.h @@ -19,6 +19,9 @@ #include "llvm/ADT/Triple.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "PPCGenSubtarget.inc" + // GCC #defines PPC on Linux but we use it as our namespace name #undef PPC @@ -42,7 +45,7 @@ namespace PPC { class GlobalValue; class TargetMachine; -class PPCSubtarget : public TargetSubtarget { +class PPCSubtarget : public PPCGenSubtargetInfo { protected: /// stackAlignment - The minimum alignment known to hold of the stack frame on /// entry to the function and which must be maintained by every function. diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.cpp b/llvm/lib/Target/Sparc/SparcSubtarget.cpp index 06bfc64ab8e..3f7b23ad95f 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.cpp +++ b/llvm/lib/Target/Sparc/SparcSubtarget.cpp @@ -12,11 +12,17 @@ //===----------------------------------------------------------------------===// #include "SparcSubtarget.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC #include "SparcGenSubtarget.inc" + using namespace llvm; SparcSubtarget::SparcSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool is64Bit) : + SparcGenSubtargetInfo(), IsV9(false), V8DeprecatedInsts(false), IsVIS(false), diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.h b/llvm/lib/Target/Sparc/SparcSubtarget.h index eabf390d378..af35e4c5fdb 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.h +++ b/llvm/lib/Target/Sparc/SparcSubtarget.h @@ -17,9 +17,12 @@ #include "llvm/Target/TargetSubtarget.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "SparcGenSubtarget.inc" + namespace llvm { -class SparcSubtarget : public TargetSubtarget { +class SparcSubtarget : public SparcGenSubtargetInfo { bool IsV9; bool V8DeprecatedInsts; bool IsVIS; diff --git a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp index 95521b2841f..33c990613a3 100644 --- a/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp +++ b/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp @@ -13,16 +13,20 @@ #include "SystemZSubtarget.h" #include "SystemZ.h" -#include "SystemZGenSubtarget.inc" #include "llvm/GlobalValue.h" #include "llvm/Target/TargetMachine.h" +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "SystemZGenSubtarget.inc" + using namespace llvm; SystemZSubtarget::SystemZSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS): - HasZ10Insts(false) { + SystemZGenSubtargetInfo(), HasZ10Insts(false) { std::string CPUName = CPU; if (CPUName.empty()) CPUName = "z9"; diff --git a/llvm/lib/Target/SystemZ/SystemZSubtarget.h b/llvm/lib/Target/SystemZ/SystemZSubtarget.h index 453471c691b..a08f2dab0d6 100644 --- a/llvm/lib/Target/SystemZ/SystemZSubtarget.h +++ b/llvm/lib/Target/SystemZ/SystemZSubtarget.h @@ -15,14 +15,16 @@ #define LLVM_TARGET_SystemZ_SUBTARGET_H #include "llvm/Target/TargetSubtarget.h" - #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "SystemZGenSubtarget.inc" + namespace llvm { class GlobalValue; class TargetMachine; -class SystemZSubtarget : public TargetSubtarget { +class SystemZSubtarget : public SystemZGenSubtargetInfo { bool HasZ10Insts; public: /// This constructor initializes the data members to match that diff --git a/llvm/lib/Target/X86/X86Subtarget.cpp b/llvm/lib/Target/X86/X86Subtarget.cpp index d7f630ce885..5c653f6c422 100644 --- a/llvm/lib/Target/X86/X86Subtarget.cpp +++ b/llvm/lib/Target/X86/X86Subtarget.cpp @@ -14,13 +14,18 @@ #define DEBUG_TYPE "subtarget" #include "X86Subtarget.h" #include "X86InstrInfo.h" -#include "X86GenSubtarget.inc" #include "llvm/GlobalValue.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #include "llvm/Support/Host.h" #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/SmallVector.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "X86GenSubtarget.inc" + using namespace llvm; #if defined(_MSC_VER) @@ -287,7 +292,8 @@ void X86Subtarget::AutoDetectSubtargetFeatures() { X86Subtarget::X86Subtarget(const std::string &TT, const std::string &CPU, const std::string &FS, bool is64Bit, unsigned StackAlignOverride) - : PICStyle(PICStyles::None) + : X86GenSubtargetInfo() + , PICStyle(PICStyles::None) , X86SSELevel(NoMMXSSE) , X863DNowLevel(NoThreeDNow) , HasCMov(false) diff --git a/llvm/lib/Target/X86/X86Subtarget.h b/llvm/lib/Target/X86/X86Subtarget.h index 80a4103cceb..cafc082bd7a 100644 --- a/llvm/lib/Target/X86/X86Subtarget.h +++ b/llvm/lib/Target/X86/X86Subtarget.h @@ -19,6 +19,9 @@ #include "llvm/CallingConv.h" #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "X86GenSubtarget.inc" + namespace llvm { class GlobalValue; class TargetMachine; @@ -35,7 +38,7 @@ enum Style { }; } -class X86Subtarget : public TargetSubtarget { +class X86Subtarget : public X86GenSubtargetInfo { protected: enum X86SSEEnum { NoMMXSSE, MMX, SSE1, SSE2, SSE3, SSSE3, SSE41, SSE42 diff --git a/llvm/lib/Target/XCore/XCoreSubtarget.cpp b/llvm/lib/Target/XCore/XCoreSubtarget.cpp index 0447d2eeadb..ef13520b674 100644 --- a/llvm/lib/Target/XCore/XCoreSubtarget.cpp +++ b/llvm/lib/Target/XCore/XCoreSubtarget.cpp @@ -13,9 +13,16 @@ #include "XCoreSubtarget.h" #include "XCore.h" + +#define GET_SUBTARGETINFO_CTOR +#define GET_SUBTARGETINFO_MC_DESC +#define GET_SUBTARGETINFO_TARGET_DESC +#include "XCoreGenSubtarget.inc" + using namespace llvm; XCoreSubtarget::XCoreSubtarget(const std::string &TT, const std::string &CPU, const std::string &FS) + : XCoreGenSubtargetInfo() { } diff --git a/llvm/lib/Target/XCore/XCoreSubtarget.h b/llvm/lib/Target/XCore/XCoreSubtarget.h index ee40d36d313..182e5c48611 100644 --- a/llvm/lib/Target/XCore/XCoreSubtarget.h +++ b/llvm/lib/Target/XCore/XCoreSubtarget.h @@ -16,12 +16,14 @@ #include "llvm/Target/TargetSubtarget.h" #include "llvm/Target/TargetMachine.h" - #include <string> +#define GET_SUBTARGETINFO_HEADER +#include "XCoreGenSubtarget.inc" + namespace llvm { -class XCoreSubtarget : public TargetSubtarget { +class XCoreSubtarget : public XCoreGenSubtargetInfo { public: /// This constructor initializes the data members to match that |