summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2014-06-11 00:53:17 +0000
committerEric Christopher <echristo@gmail.com>2014-06-11 00:53:17 +0000
commita475d5c54a9fdf8c6cf5097f11ef721500355a90 (patch)
treed36081c112f562097fa8c2a28eb42f90fa15a841 /llvm/lib/Target/PowerPC
parent72f1cae5c09e6708ba2e7dbd998693376e978161 (diff)
downloadbcm5719-llvm-a475d5c54a9fdf8c6cf5097f11ef721500355a90.tar.gz
bcm5719-llvm-a475d5c54a9fdf8c6cf5097f11ef721500355a90.zip
Remove duplicate copy of InstrItineraryData from the TargetMachine,
it's already on the subtarget. llvm-svn: 210619
Diffstat (limited to 'llvm/lib/Target/PowerPC')
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.cpp18
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetMachine.h3
2 files changed, 8 insertions, 13 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
index 2323addd21a..2e55a76515f 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
@@ -72,18 +72,14 @@ static std::string getDataLayoutString(const PPCSubtarget &ST) {
return Ret;
}
-PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT,
- StringRef CPU, StringRef FS,
- const TargetOptions &Options,
+PPCTargetMachine::PPCTargetMachine(const Target &T, StringRef TT, StringRef CPU,
+ StringRef FS, const TargetOptions &Options,
Reloc::Model RM, CodeModel::Model CM,
- CodeGenOpt::Level OL,
- bool is64Bit)
- : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
- Subtarget(TT, CPU, FS, is64Bit, OL),
- DL(getDataLayoutString(Subtarget)), InstrInfo(*this),
- FrameLowering(Subtarget), JITInfo(*this, is64Bit),
- TLInfo(*this), TSInfo(*this),
- InstrItins(Subtarget.getInstrItineraryData()) {
+ CodeGenOpt::Level OL, bool is64Bit)
+ : LLVMTargetMachine(T, TT, CPU, FS, Options, RM, CM, OL),
+ Subtarget(TT, CPU, FS, is64Bit, OL), DL(getDataLayoutString(Subtarget)),
+ InstrInfo(*this), FrameLowering(Subtarget), JITInfo(*this, is64Bit),
+ TLInfo(*this), TSInfo(*this) {
initAsmInfo();
}
diff --git a/llvm/lib/Target/PowerPC/PPCTargetMachine.h b/llvm/lib/Target/PowerPC/PPCTargetMachine.h
index 9e924945d8f..7d76ec4dd96 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetMachine.h
+++ b/llvm/lib/Target/PowerPC/PPCTargetMachine.h
@@ -35,7 +35,6 @@ class PPCTargetMachine : public LLVMTargetMachine {
PPCJITInfo JITInfo;
PPCTargetLowering TLInfo;
PPCSelectionDAGInfo TSInfo;
- InstrItineraryData InstrItins;
public:
PPCTargetMachine(const Target &T, StringRef TT,
@@ -61,7 +60,7 @@ public:
const DataLayout *getDataLayout() const override { return &DL; }
const PPCSubtarget *getSubtargetImpl() const override { return &Subtarget; }
const InstrItineraryData *getInstrItineraryData() const override {
- return &InstrItins;
+ return &getSubtargetImpl()->getInstrItineraryData();
}
// Pass Pipeline Configuration
OpenPOWER on IntegriCloud