diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 7d91d14f47c..b2e4acb338f 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -78,7 +78,6 @@ X86TargetMachine::X86TargetMachine(const Target &T, StringRef TT, : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL), Subtarget(TT, CPU, FS, Options.StackAlignmentOverride), FrameLowering(Subtarget), - InstrItins(Subtarget.getInstrItineraryData()), DL(computeDataLayout(*getSubtargetImpl())), InstrInfo(*this), TLInfo(*this), diff --git a/lib/Target/X86/X86TargetMachine.h b/lib/Target/X86/X86TargetMachine.h index 57e6eda6bc1..1a1056b98cd 100644 --- a/lib/Target/X86/X86TargetMachine.h +++ b/lib/Target/X86/X86TargetMachine.h @@ -31,7 +31,6 @@ class X86TargetMachine final : public LLVMTargetMachine { virtual void anchor(); X86Subtarget Subtarget; X86FrameLowering FrameLowering; - InstrItineraryData InstrItins; const DataLayout DL; // Calculates type size & alignment X86InstrInfo InstrInfo; X86TargetLowering TLInfo; @@ -65,7 +64,7 @@ public: return &getInstrInfo()->getRegisterInfo(); } const InstrItineraryData *getInstrItineraryData() const override { - return &InstrItins; + return &getSubtargetImpl()->getInstrItineraryData(); } /// \brief Register X86 analysis passes with a pass manager.