Skip to content

Commit

Permalink
InstrItineraryData is already on the subtarget, no reason to
Browse files Browse the repository at this point in the history
cache it on the target as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211818 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
echristo committed Jun 27, 2014
1 parent b1b6d10 commit 2c7ee9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
13 changes: 5 additions & 8 deletions lib/Target/Hexagon/HexagonTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,12 @@ SchedCustomRegistry("hexagon", "Run Hexagon's custom scheduler",
HexagonTargetMachine::HexagonTargetMachine(const Target &T, StringRef TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Reloc::Model RM,
CodeModel::Model CM,
Reloc::Model RM, CodeModel::Model CM,
CodeGenOpt::Level OL)
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
DL("e-m:e-p:32:32-i1:32-i64:64-a:0-n32") ,
Subtarget(TT, CPU, FS), InstrInfo(Subtarget), TLInfo(*this),
TSInfo(*this),
FrameLowering(Subtarget),
InstrItins(&Subtarget.getInstrItineraryData()) {
: LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
DL("e-m:e-p:32:32-i1:32-i64:64-a:0-n32"), Subtarget(TT, CPU, FS),
InstrInfo(Subtarget), TLInfo(*this), TSInfo(*this),
FrameLowering(Subtarget) {
initAsmInfo();
}

Expand Down
3 changes: 1 addition & 2 deletions lib/Target/Hexagon/HexagonTargetMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class HexagonTargetMachine : public LLVMTargetMachine {
HexagonTargetLowering TLInfo;
HexagonSelectionDAGInfo TSInfo;
HexagonFrameLowering FrameLowering;
const InstrItineraryData* InstrItins;

public:
HexagonTargetMachine(const Target &T, StringRef TT,StringRef CPU,
Expand All @@ -52,7 +51,7 @@ class HexagonTargetMachine : public LLVMTargetMachine {
}

const InstrItineraryData* getInstrItineraryData() const override {
return InstrItins;
return &getSubtargetImpl()->getInstrItineraryData();
}


Expand Down

0 comments on commit 2c7ee9b

Please sign in to comment.