Remove InstrItineraryData off of the TargetMachine - it's already
authorEric Christopher <echristo@gmail.com>
Fri, 13 Jun 2014 23:11:13 +0000 (23:11 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 13 Jun 2014 23:11:13 +0000 (23:11 +0000)
on the subtarget and just forward the accessor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210955 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.h

index 79313fa..e55adfa 100644 (file)
@@ -52,8 +52,7 @@ ARMBaseTargetMachine::ARMBaseTargetMachine(const Target &T, StringRef TT,
                                            CodeGenOpt::Level OL,
                                            bool isLittle)
   : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
-    Subtarget(TT, CPU, FS, isLittle, Options),
-    InstrItins(Subtarget.getInstrItineraryData()) {
+    Subtarget(TT, CPU, FS, isLittle, Options) {
 
   // Default to triple-appropriate float ABI
   if (Options.FloatABIType == FloatABI::Default)
index 986789b..4100d2e 100644 (file)
@@ -32,9 +32,6 @@ namespace llvm {
 class ARMBaseTargetMachine : public LLVMTargetMachine {
 protected:
   ARMSubtarget        Subtarget;
-private:
-  InstrItineraryData  InstrItins;
-
 public:
   ARMBaseTargetMachine(const Target &T, StringRef TT,
                        StringRef CPU, StringRef FS,
@@ -49,7 +46,7 @@ public:
     llvm_unreachable("getTargetLowering not implemented");
   }
   const InstrItineraryData *getInstrItineraryData() const override {
-    return &InstrItins;
+    return &getSubtargetImpl()->getInstrItineraryData();
   }
 
   /// \brief Register ARM analysis passes with a pass manager.