mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-13 08:25:27 +00:00
[multiversion] Remove the cached TargetMachine pointer from the
intermediate TTI implementation template and instead query up to the derived class for both the TargetMachine and the TargetLowering. Most of the derived types had a TLI cached already and there is no need to store a less precisely typed target machine pointer. This will in turn make it much cleaner to look up the TLI via a per-function subtarget instead of the generic subtarget, and it will pave the way toward pulling the subtarget used for unroll preferences into the same form once we are *always* using the function to look up the correct subtarget. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,4 +33,5 @@ cl::opt<unsigned>
|
||||
cl::desc("Threshold for partial unrolling"),
|
||||
cl::Hidden);
|
||||
|
||||
BasicTTIImpl::BasicTTIImpl(const TargetMachine *TM) : BaseT(TM) {}
|
||||
BasicTTIImpl::BasicTTIImpl(const TargetMachine *TM)
|
||||
: BaseT(TM), TM(TM), TLI(TM->getSubtargetImpl()->getTargetLowering()) {}
|
||||
|
Reference in New Issue
Block a user