[llvm] r210955 - Remove InstrItineraryData off of the TargetMachine - it's already

Eric Christopher echristo at gmail.com
Fri Jun 13 16:11:14 PDT 2014


Author: echristo
Date: Fri Jun 13 18:11:13 2014
New Revision: 210955

URL: http://llvm.org/viewvc/llvm-project?rev=210955&view=rev
Log:
Remove InstrItineraryData off of the TargetMachine - it's already
on the subtarget and just forward the accessor.

Modified:
    llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
    llvm/trunk/lib/Target/ARM/ARMTargetMachine.h

Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp?rev=210955&r1=210954&r2=210955&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.cpp Fri Jun 13 18:11:13 2014
@@ -52,8 +52,7 @@ ARMBaseTargetMachine::ARMBaseTargetMachi
                                            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)

Modified: llvm/trunk/lib/Target/ARM/ARMTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMTargetMachine.h?rev=210955&r1=210954&r2=210955&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMTargetMachine.h (original)
+++ llvm/trunk/lib/Target/ARM/ARMTargetMachine.h Fri Jun 13 18:11:13 2014
@@ -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.





More information about the llvm-commits mailing list