Remove the target independent TargetMachine::getSubtarget and
[oota-llvm.git] / lib / Target / R600 / AMDGPUTargetMachine.h
index 83ffd22ec97d5c433a2615250496b781331e3bbd..785c119a1028fccd3ab31b5b5fb29194a67aa136 100644 (file)
@@ -30,7 +30,6 @@ namespace llvm {
 
 class AMDGPUTargetMachine : public LLVMTargetMachine {
 private:
-  const DataLayout DL;
 
 protected:
   TargetLoweringObjectFile *TLOF;
@@ -42,19 +41,14 @@ public:
                       StringRef CPU, TargetOptions Options, Reloc::Model RM,
                       CodeModel::Model CM, CodeGenOpt::Level OL);
   ~AMDGPUTargetMachine();
-  // FIXME: This is currently broken, the DataLayout needs to move to
-  // the target machine.
-  const DataLayout *getDataLayout() const override {
-    return &DL;
-  }
-  const AMDGPUSubtarget *getSubtargetImpl() const override {
+
+  const AMDGPUSubtarget *getSubtargetImpl() const { return &Subtarget; }
+  const AMDGPUSubtarget *getSubtargetImpl(const Function &) const override {
     return &Subtarget;
   }
   const AMDGPUIntrinsicInfo *getIntrinsicInfo() const override {
     return &IntrinsicInfo;
   }
-  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
-
   TargetIRAnalysis getTargetIRAnalysis() override;
 
   TargetLoweringObjectFile *getObjFileLowering() const override {
@@ -72,6 +66,8 @@ public:
   R600TargetMachine(const Target &T, StringRef TT, StringRef FS,
                     StringRef CPU, TargetOptions Options, Reloc::Model RM,
                     CodeModel::Model CM, CodeGenOpt::Level OL);
+
+  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
 };
 
 //===----------------------------------------------------------------------===//
@@ -84,6 +80,8 @@ public:
   GCNTargetMachine(const Target &T, StringRef TT, StringRef FS,
                     StringRef CPU, TargetOptions Options, Reloc::Model RM,
                     CodeModel::Model CM, CodeGenOpt::Level OL);
+
+  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
 };
 
 } // End namespace llvm