diff options
author | Eric Christopher <echristo@gmail.com> | 2015-02-13 22:23:04 +0000 |
---|---|---|
committer | Eric Christopher <echristo@gmail.com> | 2015-02-13 22:23:04 +0000 |
commit | e8dbfe1cf80fb43dba504890a9c26200036997a9 (patch) | |
tree | d862d6343a5b05560de78f63103783189ad04056 /llvm/lib/Target/PowerPC/PPCSubtarget.cpp | |
parent | a4ae2131935725fbe80bc27cbf447f4bc1d8adbb (diff) | |
download | llvm-e8dbfe1cf80fb43dba504890a9c26200036997a9.zip llvm-e8dbfe1cf80fb43dba504890a9c26200036997a9.tar.gz llvm-e8dbfe1cf80fb43dba504890a9c26200036997a9.tar.bz2 |
Stash the TargetMachine on the subtarget so we can access it later.
Clean up a subtarget function that has it passed in while we're at it.
llvm-svn: 229164
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCSubtarget.cpp')
-rw-r--r-- | llvm/lib/Target/PowerPC/PPCSubtarget.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp index e025a3b..0bda665 100644 --- a/llvm/lib/Target/PowerPC/PPCSubtarget.cpp +++ b/llvm/lib/Target/PowerPC/PPCSubtarget.cpp @@ -51,7 +51,7 @@ PPCSubtarget::PPCSubtarget(const std::string &TT, const std::string &CPU, TargetTriple.getArch() == Triple::ppc64le), TargetABI(PPC_ABI_UNKNOWN), FrameLowering(initializeSubtargetDependencies(CPU, FS)), InstrInfo(*this), - TLInfo(TM, *this), TSInfo(TM.getDataLayout()) {} + TLInfo(TM, *this), TSInfo(TM.getDataLayout()), TM(TM) {} void PPCSubtarget::initializeEnvironment() { StackAlignment = 16; @@ -147,8 +147,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) { /// hasLazyResolverStub - Return true if accesses to the specified global have /// to go through a dyld lazy resolution stub. This means that an extra load /// is required to get the address of the global. -bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV, - const TargetMachine &TM) const { +bool PPCSubtarget::hasLazyResolverStub(const GlobalValue *GV) const { // We never have stubs if HasLazyResolverStubs=false or if in static mode. if (!HasLazyResolverStubs || TM.getRelocationModel() == Reloc::Static) return false; |