Move the R600 intrinsic support back to the target machine - there's

nothing subtarget dependent about the intrinsic support in any
backend as far as I can tell.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2014-08-04 17:37:43 +00:00
parent 981eb59138
commit b88bbc0e9d
4 changed files with 4 additions and 6 deletions

View File

@ -83,7 +83,7 @@ AMDGPUSubtarget::AMDGPUSubtarget(StringRef TT, StringRef GPU, StringRef FS,
FrameLowering(TargetFrameLowering::StackGrowsUp,
64 * 16, // Maximum stack alignment (long16)
0),
IntrinsicInfo(), InstrItins(getInstrItineraryForCPU(GPU)) {
InstrItins(getInstrItineraryForCPU(GPU)) {
if (getGeneration() <= AMDGPUSubtarget::NORTHERN_ISLANDS) {
InstrInfo.reset(new R600InstrInfo(*this));

View File

@ -65,7 +65,6 @@ private:
const DataLayout DL;
AMDGPUFrameLowering FrameLowering;
AMDGPUIntrinsicInfo IntrinsicInfo;
std::unique_ptr<AMDGPUTargetLowering> TLInfo;
std::unique_ptr<AMDGPUInstrInfo> InstrInfo;
InstrItineraryData InstrItins;
@ -75,7 +74,6 @@ public:
AMDGPUSubtarget &initializeSubtargetDependencies(StringRef GPU, StringRef FS);
const AMDGPUFrameLowering *getFrameLowering() const { return &FrameLowering; }
const AMDGPUIntrinsicInfo *getIntrinsicInfo() const { return &IntrinsicInfo; }
const AMDGPUInstrInfo *getInstrInfo() const { return InstrInfo.get(); }
const AMDGPURegisterInfo *getRegisterInfo() const {
return &InstrInfo->getRegisterInfo();

View File

@ -54,7 +54,7 @@ AMDGPUTargetMachine::AMDGPUTargetMachine(const Target &T, StringRef TT,
CodeModel::Model CM,
CodeGenOpt::Level OptLevel)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OptLevel),
Subtarget(TT, CPU, FS, *this) {
Subtarget(TT, CPU, FS, *this), IntrinsicInfo() {
setRequiresStructuredCFG(true);
initAsmInfo();
}

View File

@ -25,8 +25,8 @@
namespace llvm {
class AMDGPUTargetMachine : public LLVMTargetMachine {
AMDGPUSubtarget Subtarget;
AMDGPUIntrinsicInfo IntrinsicInfo;
public:
AMDGPUTargetMachine(const Target &T, StringRef TT, StringRef FS,
@ -37,7 +37,7 @@ public:
return getSubtargetImpl()->getFrameLowering();
}
const AMDGPUIntrinsicInfo *getIntrinsicInfo() const override {
return getSubtargetImpl()->getIntrinsicInfo();
return &IntrinsicInfo;
}
const AMDGPUInstrInfo *getInstrInfo() const override {
return getSubtargetImpl()->getInstrInfo();