diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 12:11:05 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-15 12:11:05 +0000 |
commit | 03f4bc5d6cf777c8aa559c299ef7f85126872881 (patch) | |
tree | dccd08e465e3256502fb847f574b8f8b5018e70b /lib/Target/PowerPC | |
parent | c3493cca4c3b4968e6a27a8eaa9031dcffb2073a (diff) | |
download | external_llvm-03f4bc5d6cf777c8aa559c299ef7f85126872881.tar.gz external_llvm-03f4bc5d6cf777c8aa559c299ef7f85126872881.tar.bz2 external_llvm-03f4bc5d6cf777c8aa559c299ef7f85126872881.zip |
Provide TargetMachine implementations with reference to Target they were created
from.
- This commit is almost entirely propogating the reference through the
TargetMachine subclasses' constructor calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75778 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC')
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.cpp | 17 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCTargetMachine.h | 7 |
2 files changed, 14 insertions, 10 deletions
diff --git a/lib/Target/PowerPC/PPCTargetMachine.cpp b/lib/Target/PowerPC/PPCTargetMachine.cpp index cac97e438f..914d6728c6 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.cpp +++ b/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -102,9 +102,10 @@ unsigned PPC64TargetMachine::getModuleMatchQuality(const Module &M) { } -PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, - bool is64Bit) - : Subtarget(*this, M, FS, is64Bit), +PPCTargetMachine::PPCTargetMachine(const Target&T, const Module &M, + const std::string &FS, bool is64Bit) + : LLVMTargetMachine(T), + Subtarget(*this, M, FS, is64Bit), DataLayout(Subtarget.getTargetDataString()), InstrInfo(*this), FrameInfo(*this, is64Bit), JITInfo(*this, is64Bit), TLInfo(*this), InstrItins(Subtarget.getInstrItineraryData()), MachOWriterInfo(*this) { @@ -121,13 +122,15 @@ PPCTargetMachine::PPCTargetMachine(const Module &M, const std::string &FS, /// groups, which typically degrades performance. bool PPCTargetMachine::getEnableTailMergeDefault() const { return false; } -PPC32TargetMachine::PPC32TargetMachine(const Module &M, const std::string &FS) - : PPCTargetMachine(M, FS, false) { +PPC32TargetMachine::PPC32TargetMachine(const Target &T, const Module &M, + const std::string &FS) + : PPCTargetMachine(T, M, FS, false) { } -PPC64TargetMachine::PPC64TargetMachine(const Module &M, const std::string &FS) - : PPCTargetMachine(M, FS, true) { +PPC64TargetMachine::PPC64TargetMachine(const Target &T, const Module &M, + const std::string &FS) + : PPCTargetMachine(T, M, FS, true) { } diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index 393474c576..c489751283 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -50,7 +50,8 @@ protected: static AsmPrinterCtorFn AsmPrinterCtor; public: - PPCTargetMachine(const Module &M, const std::string &FS, bool is64Bit); + PPCTargetMachine(const Target &T, const Module &M, const std::string &FS, + bool is64Bit); virtual const PPCInstrInfo *getInstrInfo() const { return &InstrInfo; } virtual const PPCFrameInfo *getFrameInfo() const { return &FrameInfo; } @@ -103,7 +104,7 @@ public: /// class PPC32TargetMachine : public PPCTargetMachine { public: - PPC32TargetMachine(const Module &M, const std::string &FS); + PPC32TargetMachine(const Target &T, const Module &M, const std::string &FS); static unsigned getJITMatchQuality(); static unsigned getModuleMatchQuality(const Module &M); @@ -113,7 +114,7 @@ public: /// class PPC64TargetMachine : public PPCTargetMachine { public: - PPC64TargetMachine(const Module &M, const std::string &FS); + PPC64TargetMachine(const Target &T, const Module &M, const std::string &FS); static unsigned getJITMatchQuality(); static unsigned getModuleMatchQuality(const Module &M); |