1 //===- BasicTTIImpl.h -------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 /// This file provides a helper that implements much of the TTI interface in
11 /// terms of the target-independent code generator and TargetLowering
14 //===----------------------------------------------------------------------===//
16 #ifndef LLVM_CODEGEN_BASICTTIIMPL_H
17 #define LLVM_CODEGEN_BASICTTIIMPL_H
19 #include "llvm/Analysis/LoopInfo.h"
20 #include "llvm/Analysis/TargetTransformInfoImpl.h"
21 #include "llvm/Support/CommandLine.h"
22 #include "llvm/Target/TargetLowering.h"
23 #include "llvm/Target/TargetSubtargetInfo.h"
27 extern cl::opt<unsigned> PartialUnrollingThreshold;
29 /// \brief Base class which can be used to help build a TTI implementation.
31 /// This class provides as much implementation of the TTI interface as is
32 /// possible using the target independent parts of the code generator.
34 /// In order to subclass it, your class must implement a getST() method to
35 /// return the subtarget, and a getTLI() method to return the target lowering.
36 /// We need these methods implemented in the derived class so that this class
37 /// doesn't have to duplicate storage for them.
39 class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
41 typedef TargetTransformInfoImplCRTPBase<T> BaseT;
42 typedef TargetTransformInfo TTI;
44 /// Estimate the overhead of scalarizing an instruction. Insert and Extract
45 /// are set if the result needs to be inserted and/or extracted from vectors.
46 unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) {
47 assert(Ty->isVectorTy() && "Can only scalarize vectors");
50 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
52 Cost += static_cast<T *>(this)
53 ->getVectorInstrCost(Instruction::InsertElement, Ty, i);
55 Cost += static_cast<T *>(this)
56 ->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
62 /// Estimate the cost overhead of SK_Alternate shuffle.
63 unsigned getAltShuffleOverhead(Type *Ty) {
64 assert(Ty->isVectorTy() && "Can only shuffle vectors");
66 // Shuffle cost is equal to the cost of extracting element from its argument
67 // plus the cost of inserting them onto the result vector.
69 // e.g. <4 x float> has a mask of <0,5,2,7> i.e we need to extract from
70 // index 0 of first vector, index 1 of second vector,index 2 of first
71 // vector and finally index 3 of second vector and insert them at index
72 // <0,1,2,3> of result vector.
73 for (int i = 0, e = Ty->getVectorNumElements(); i < e; ++i) {
74 Cost += static_cast<T *>(this)
75 ->getVectorInstrCost(Instruction::InsertElement, Ty, i);
76 Cost += static_cast<T *>(this)
77 ->getVectorInstrCost(Instruction::ExtractElement, Ty, i);
82 /// \brief Local query method delegates up to T which *must* implement this!
83 const TargetSubtargetInfo *getST() const {
84 return static_cast<const T *>(this)->getST();
87 /// \brief Local query method delegates up to T which *must* implement this!
88 const TargetLoweringBase *getTLI() const {
89 return static_cast<const T *>(this)->getTLI();
93 explicit BasicTTIImplBase(const TargetMachine *TM)
94 : BaseT(TM->getDataLayout()) {}
97 // Provide value semantics. MSVC requires that we spell all of these out.
98 BasicTTIImplBase(const BasicTTIImplBase &Arg)
99 : BaseT(static_cast<const BaseT &>(Arg)) {}
100 BasicTTIImplBase(BasicTTIImplBase &&Arg)
101 : BaseT(std::move(static_cast<BaseT &>(Arg))) {}
102 BasicTTIImplBase &operator=(const BasicTTIImplBase &RHS) {
103 BaseT::operator=(static_cast<const BaseT &>(RHS));
106 BasicTTIImplBase &operator=(BasicTTIImplBase &&RHS) {
107 BaseT::operator=(std::move(static_cast<BaseT &>(RHS)));
111 /// \name Scalar TTI Implementations
114 bool hasBranchDivergence() { return false; }
116 bool isLegalAddImmediate(int64_t imm) {
117 return getTLI()->isLegalAddImmediate(imm);
120 bool isLegalICmpImmediate(int64_t imm) {
121 return getTLI()->isLegalICmpImmediate(imm);
124 bool isLegalAddressingMode(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
125 bool HasBaseReg, int64_t Scale) {
126 TargetLoweringBase::AddrMode AM;
128 AM.BaseOffs = BaseOffset;
129 AM.HasBaseReg = HasBaseReg;
131 return getTLI()->isLegalAddressingMode(AM, Ty);
134 int getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset,
135 bool HasBaseReg, int64_t Scale) {
136 TargetLoweringBase::AddrMode AM;
138 AM.BaseOffs = BaseOffset;
139 AM.HasBaseReg = HasBaseReg;
141 return getTLI()->getScalingFactorCost(AM, Ty);
144 bool isTruncateFree(Type *Ty1, Type *Ty2) {
145 return getTLI()->isTruncateFree(Ty1, Ty2);
148 bool isProfitableToHoist(Instruction *I) {
149 return getTLI()->isProfitableToHoist(I);
152 bool isTypeLegal(Type *Ty) {
153 EVT VT = getTLI()->getValueType(Ty);
154 return getTLI()->isTypeLegal(VT);
157 unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy,
158 ArrayRef<const Value *> Arguments) {
159 return BaseT::getIntrinsicCost(IID, RetTy, Arguments);
162 unsigned getIntrinsicCost(Intrinsic::ID IID, Type *RetTy,
163 ArrayRef<Type *> ParamTys) {
164 if (IID == Intrinsic::cttz) {
165 if (getTLI()->isCheapToSpeculateCttz())
166 return TargetTransformInfo::TCC_Basic;
167 return TargetTransformInfo::TCC_Expensive;
170 if (IID == Intrinsic::ctlz) {
171 if (getTLI()->isCheapToSpeculateCtlz())
172 return TargetTransformInfo::TCC_Basic;
173 return TargetTransformInfo::TCC_Expensive;
176 return BaseT::getIntrinsicCost(IID, RetTy, ParamTys);
179 unsigned getJumpBufAlignment() { return getTLI()->getJumpBufAlignment(); }
181 unsigned getJumpBufSize() { return getTLI()->getJumpBufSize(); }
183 bool shouldBuildLookupTables() {
184 const TargetLoweringBase *TLI = getTLI();
185 return TLI->isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) ||
186 TLI->isOperationLegalOrCustom(ISD::BRIND, MVT::Other);
189 bool haveFastSqrt(Type *Ty) {
190 const TargetLoweringBase *TLI = getTLI();
191 EVT VT = TLI->getValueType(Ty);
192 return TLI->isTypeLegal(VT) &&
193 TLI->isOperationLegalOrCustom(ISD::FSQRT, VT);
196 unsigned getFPOpCost(Type *Ty) {
197 // By default, FP instructions are no more expensive since they are
198 // implemented in HW. Target specific TTI can override this.
199 return TargetTransformInfo::TCC_Basic;
202 unsigned getOperationCost(unsigned Opcode, Type *Ty, Type *OpTy) {
203 const TargetLoweringBase *TLI = getTLI();
206 case Instruction::Trunc: {
207 if (TLI->isTruncateFree(OpTy, Ty))
208 return TargetTransformInfo::TCC_Free;
209 return TargetTransformInfo::TCC_Basic;
211 case Instruction::ZExt: {
212 if (TLI->isZExtFree(OpTy, Ty))
213 return TargetTransformInfo::TCC_Free;
214 return TargetTransformInfo::TCC_Basic;
218 return BaseT::getOperationCost(Opcode, Ty, OpTy);
221 void getUnrollingPreferences(Loop *L, TTI::UnrollingPreferences &UP) {
222 // This unrolling functionality is target independent, but to provide some
223 // motivation for its intended use, for x86:
225 // According to the Intel 64 and IA-32 Architectures Optimization Reference
226 // Manual, Intel Core models and later have a loop stream detector (and
227 // associated uop queue) that can benefit from partial unrolling.
228 // The relevant requirements are:
229 // - The loop must have no more than 4 (8 for Nehalem and later) branches
230 // taken, and none of them may be calls.
231 // - The loop can have no more than 18 (28 for Nehalem and later) uops.
233 // According to the Software Optimization Guide for AMD Family 15h
234 // Processors, models 30h-4fh (Steamroller and later) have a loop predictor
235 // and loop buffer which can benefit from partial unrolling.
236 // The relevant requirements are:
237 // - The loop must have fewer than 16 branches
238 // - The loop must have less than 40 uops in all executed loop branches
240 // The number of taken branches in a loop is hard to estimate here, and
241 // benchmarking has revealed that it is better not to be conservative when
242 // estimating the branch count. As a result, we'll ignore the branch limits
243 // until someone finds a case where it matters in practice.
246 const TargetSubtargetInfo *ST = getST();
247 if (PartialUnrollingThreshold.getNumOccurrences() > 0)
248 MaxOps = PartialUnrollingThreshold;
249 else if (ST->getSchedModel().LoopMicroOpBufferSize > 0)
250 MaxOps = ST->getSchedModel().LoopMicroOpBufferSize;
254 // Scan the loop: don't unroll loops with calls.
255 for (Loop::block_iterator I = L->block_begin(), E = L->block_end(); I != E;
259 for (BasicBlock::iterator J = BB->begin(), JE = BB->end(); J != JE; ++J)
260 if (isa<CallInst>(J) || isa<InvokeInst>(J)) {
261 ImmutableCallSite CS(J);
262 if (const Function *F = CS.getCalledFunction()) {
263 if (!static_cast<T *>(this)->isLoweredToCall(F))
271 // Enable runtime and partial unrolling up to the specified size.
272 UP.Partial = UP.Runtime = true;
273 UP.PartialThreshold = UP.PartialOptSizeThreshold = MaxOps;
278 /// \name Vector TTI Implementations
281 unsigned getNumberOfRegisters(bool Vector) { return 1; }
283 unsigned getRegisterBitWidth(bool Vector) { return 32; }
285 unsigned getMaxInterleaveFactor() { return 1; }
287 unsigned getArithmeticInstrCost(
288 unsigned Opcode, Type *Ty,
289 TTI::OperandValueKind Opd1Info = TTI::OK_AnyValue,
290 TTI::OperandValueKind Opd2Info = TTI::OK_AnyValue,
291 TTI::OperandValueProperties Opd1PropInfo = TTI::OP_None,
292 TTI::OperandValueProperties Opd2PropInfo = TTI::OP_None) {
293 // Check if any of the operands are vector operands.
294 const TargetLoweringBase *TLI = getTLI();
295 int ISD = TLI->InstructionOpcodeToISD(Opcode);
296 assert(ISD && "Invalid opcode");
298 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(Ty);
300 bool IsFloat = Ty->getScalarType()->isFloatingPointTy();
301 // Assume that floating point arithmetic operations cost twice as much as
302 // integer operations.
303 unsigned OpCost = (IsFloat ? 2 : 1);
305 if (TLI->isOperationLegalOrPromote(ISD, LT.second)) {
306 // The operation is legal. Assume it costs 1.
307 // If the type is split to multiple registers, assume that there is some
309 // TODO: Once we have extract/insert subvector cost we need to use them.
311 return LT.first * 2 * OpCost;
312 return LT.first * 1 * OpCost;
315 if (!TLI->isOperationExpand(ISD, LT.second)) {
316 // If the operation is custom lowered then assume
317 // thare the code is twice as expensive.
318 return LT.first * 2 * OpCost;
321 // Else, assume that we need to scalarize this op.
322 if (Ty->isVectorTy()) {
323 unsigned Num = Ty->getVectorNumElements();
324 unsigned Cost = static_cast<T *>(this)
325 ->getArithmeticInstrCost(Opcode, Ty->getScalarType());
326 // return the cost of multiple scalar invocation plus the cost of
328 // and extracting the values.
329 return getScalarizationOverhead(Ty, true, true) + Num * Cost;
332 // We don't know anything about this scalar instruction.
336 unsigned getShuffleCost(TTI::ShuffleKind Kind, Type *Tp, int Index,
338 if (Kind == TTI::SK_Alternate) {
339 return getAltShuffleOverhead(Tp);
344 unsigned getCastInstrCost(unsigned Opcode, Type *Dst, Type *Src) {
345 const TargetLoweringBase *TLI = getTLI();
346 int ISD = TLI->InstructionOpcodeToISD(Opcode);
347 assert(ISD && "Invalid opcode");
349 std::pair<unsigned, MVT> SrcLT = TLI->getTypeLegalizationCost(Src);
350 std::pair<unsigned, MVT> DstLT = TLI->getTypeLegalizationCost(Dst);
352 // Check for NOOP conversions.
353 if (SrcLT.first == DstLT.first &&
354 SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) {
356 // Bitcast between types that are legalized to the same type are free.
357 if (Opcode == Instruction::BitCast || Opcode == Instruction::Trunc)
361 if (Opcode == Instruction::Trunc &&
362 TLI->isTruncateFree(SrcLT.second, DstLT.second))
365 if (Opcode == Instruction::ZExt &&
366 TLI->isZExtFree(SrcLT.second, DstLT.second))
369 // If the cast is marked as legal (or promote) then assume low cost.
370 if (SrcLT.first == DstLT.first &&
371 TLI->isOperationLegalOrPromote(ISD, DstLT.second))
374 // Handle scalar conversions.
375 if (!Src->isVectorTy() && !Dst->isVectorTy()) {
377 // Scalar bitcasts are usually free.
378 if (Opcode == Instruction::BitCast)
381 // Just check the op cost. If the operation is legal then assume it costs
383 if (!TLI->isOperationExpand(ISD, DstLT.second))
386 // Assume that illegal scalar instruction are expensive.
390 // Check vector-to-vector casts.
391 if (Dst->isVectorTy() && Src->isVectorTy()) {
393 // If the cast is between same-sized registers, then the check is simple.
394 if (SrcLT.first == DstLT.first &&
395 SrcLT.second.getSizeInBits() == DstLT.second.getSizeInBits()) {
397 // Assume that Zext is done using AND.
398 if (Opcode == Instruction::ZExt)
401 // Assume that sext is done using SHL and SRA.
402 if (Opcode == Instruction::SExt)
405 // Just check the op cost. If the operation is legal then assume it
407 // 1 and multiply by the type-legalization overhead.
408 if (!TLI->isOperationExpand(ISD, DstLT.second))
409 return SrcLT.first * 1;
412 // If we are converting vectors and the operation is illegal, or
413 // if the vectors are legalized to different types, estimate the
414 // scalarization costs.
415 unsigned Num = Dst->getVectorNumElements();
416 unsigned Cost = static_cast<T *>(this)->getCastInstrCost(
417 Opcode, Dst->getScalarType(), Src->getScalarType());
419 // Return the cost of multiple scalar invocation plus the cost of
420 // inserting and extracting the values.
421 return getScalarizationOverhead(Dst, true, true) + Num * Cost;
424 // We already handled vector-to-vector and scalar-to-scalar conversions.
426 // is where we handle bitcast between vectors and scalars. We need to assume
427 // that the conversion is scalarized in one way or another.
428 if (Opcode == Instruction::BitCast)
429 // Illegal bitcasts are done by storing and loading from a stack slot.
430 return (Src->isVectorTy() ? getScalarizationOverhead(Src, false, true)
432 (Dst->isVectorTy() ? getScalarizationOverhead(Dst, true, false)
435 llvm_unreachable("Unhandled cast");
438 unsigned getCFInstrCost(unsigned Opcode) {
439 // Branches are assumed to be predicted.
443 unsigned getCmpSelInstrCost(unsigned Opcode, Type *ValTy, Type *CondTy) {
444 const TargetLoweringBase *TLI = getTLI();
445 int ISD = TLI->InstructionOpcodeToISD(Opcode);
446 assert(ISD && "Invalid opcode");
448 // Selects on vectors are actually vector selects.
449 if (ISD == ISD::SELECT) {
450 assert(CondTy && "CondTy must exist");
451 if (CondTy->isVectorTy())
455 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(ValTy);
457 if (!(ValTy->isVectorTy() && !LT.second.isVector()) &&
458 !TLI->isOperationExpand(ISD, LT.second)) {
459 // The operation is legal. Assume it costs 1. Multiply
460 // by the type-legalization overhead.
464 // Otherwise, assume that the cast is scalarized.
465 if (ValTy->isVectorTy()) {
466 unsigned Num = ValTy->getVectorNumElements();
468 CondTy = CondTy->getScalarType();
469 unsigned Cost = static_cast<T *>(this)->getCmpSelInstrCost(
470 Opcode, ValTy->getScalarType(), CondTy);
472 // Return the cost of multiple scalar invocation plus the cost of
474 // and extracting the values.
475 return getScalarizationOverhead(ValTy, true, false) + Num * Cost;
478 // Unknown scalar opcode.
482 unsigned getVectorInstrCost(unsigned Opcode, Type *Val, unsigned Index) {
483 std::pair<unsigned, MVT> LT =
484 getTLI()->getTypeLegalizationCost(Val->getScalarType());
489 unsigned getMemoryOpCost(unsigned Opcode, Type *Src, unsigned Alignment,
490 unsigned AddressSpace) {
491 assert(!Src->isVoidTy() && "Invalid type");
492 std::pair<unsigned, MVT> LT = getTLI()->getTypeLegalizationCost(Src);
494 // Assuming that all loads of legal types cost 1.
495 unsigned Cost = LT.first;
497 if (Src->isVectorTy() &&
498 Src->getPrimitiveSizeInBits() < LT.second.getSizeInBits()) {
499 // This is a vector load that legalizes to a larger type than the vector
500 // itself. Unless the corresponding extending load or truncating store is
501 // legal, then this will scalarize.
502 TargetLowering::LegalizeAction LA = TargetLowering::Expand;
503 EVT MemVT = getTLI()->getValueType(Src, true);
504 if (MemVT.isSimple() && MemVT != MVT::Other) {
505 if (Opcode == Instruction::Store)
506 LA = getTLI()->getTruncStoreAction(LT.second, MemVT.getSimpleVT());
508 LA = getTLI()->getLoadExtAction(ISD::EXTLOAD, LT.second, MemVT);
511 if (LA != TargetLowering::Legal && LA != TargetLowering::Custom) {
512 // This is a vector load/store for some illegal type that is scalarized.
513 // We must account for the cost of building or decomposing the vector.
514 Cost += getScalarizationOverhead(Src, Opcode != Instruction::Store,
515 Opcode == Instruction::Store);
522 unsigned getIntrinsicInstrCost(Intrinsic::ID IID, Type *RetTy,
523 ArrayRef<Type *> Tys) {
527 // Assume that we need to scalarize this intrinsic.
528 unsigned ScalarizationCost = 0;
529 unsigned ScalarCalls = 1;
530 if (RetTy->isVectorTy()) {
531 ScalarizationCost = getScalarizationOverhead(RetTy, true, false);
532 ScalarCalls = std::max(ScalarCalls, RetTy->getVectorNumElements());
534 for (unsigned i = 0, ie = Tys.size(); i != ie; ++i) {
535 if (Tys[i]->isVectorTy()) {
536 ScalarizationCost += getScalarizationOverhead(Tys[i], false, true);
537 ScalarCalls = std::max(ScalarCalls, Tys[i]->getVectorNumElements());
541 return ScalarCalls + ScalarizationCost;
543 // Look for intrinsics that can be lowered directly or turned into a scalar
545 case Intrinsic::sqrt:
557 case Intrinsic::exp2:
563 case Intrinsic::log10:
566 case Intrinsic::log2:
569 case Intrinsic::fabs:
572 case Intrinsic::minnum:
575 case Intrinsic::maxnum:
578 case Intrinsic::copysign:
579 ISD = ISD::FCOPYSIGN;
581 case Intrinsic::floor:
584 case Intrinsic::ceil:
587 case Intrinsic::trunc:
590 case Intrinsic::nearbyint:
591 ISD = ISD::FNEARBYINT;
593 case Intrinsic::rint:
596 case Intrinsic::round:
605 case Intrinsic::fmuladd:
608 // FIXME: We should return 0 whenever getIntrinsicCost == TCC_Free.
609 case Intrinsic::lifetime_start:
610 case Intrinsic::lifetime_end:
612 case Intrinsic::masked_store:
613 return static_cast<T *>(this)
614 ->getMaskedMemoryOpCost(Instruction::Store, Tys[0], 0, 0);
615 case Intrinsic::masked_load:
616 return static_cast<T *>(this)
617 ->getMaskedMemoryOpCost(Instruction::Load, RetTy, 0, 0);
620 const TargetLoweringBase *TLI = getTLI();
621 std::pair<unsigned, MVT> LT = TLI->getTypeLegalizationCost(RetTy);
623 if (TLI->isOperationLegalOrPromote(ISD, LT.second)) {
624 // The operation is legal. Assume it costs 1.
625 // If the type is split to multiple registers, assume that there is some
627 // TODO: Once we have extract/insert subvector cost we need to use them.
633 if (!TLI->isOperationExpand(ISD, LT.second)) {
634 // If the operation is custom lowered then assume
635 // thare the code is twice as expensive.
639 // If we can't lower fmuladd into an FMA estimate the cost as a floating
640 // point mul followed by an add.
641 if (IID == Intrinsic::fmuladd)
642 return static_cast<T *>(this)
643 ->getArithmeticInstrCost(BinaryOperator::FMul, RetTy) +
644 static_cast<T *>(this)
645 ->getArithmeticInstrCost(BinaryOperator::FAdd, RetTy);
647 // Else, assume that we need to scalarize this intrinsic. For math builtins
648 // this will emit a costly libcall, adding call overhead and spills. Make it
650 if (RetTy->isVectorTy()) {
651 unsigned Num = RetTy->getVectorNumElements();
652 unsigned Cost = static_cast<T *>(this)->getIntrinsicInstrCost(
653 IID, RetTy->getScalarType(), Tys);
654 return 10 * Cost * Num;
657 // This is going to be turned into a library call, make it expensive.
661 unsigned getNumberOfParts(Type *Tp) {
662 std::pair<unsigned, MVT> LT = getTLI()->getTypeLegalizationCost(Tp);
666 unsigned getAddressComputationCost(Type *Ty, bool IsComplex) { return 0; }
668 unsigned getReductionCost(unsigned Opcode, Type *Ty, bool IsPairwise) {
669 assert(Ty->isVectorTy() && "Expect a vector type");
670 unsigned NumVecElts = Ty->getVectorNumElements();
671 unsigned NumReduxLevels = Log2_32(NumVecElts);
674 static_cast<T *>(this)->getArithmeticInstrCost(Opcode, Ty);
675 // Assume the pairwise shuffles add a cost.
676 unsigned ShuffleCost =
677 NumReduxLevels * (IsPairwise + 1) *
678 static_cast<T *>(this)
679 ->getShuffleCost(TTI::SK_ExtractSubvector, Ty, NumVecElts / 2, Ty);
680 return ShuffleCost + ArithCost + getScalarizationOverhead(Ty, false, true);
686 /// \brief Concrete BasicTTIImpl that can be used if no further customization
688 class BasicTTIImpl : public BasicTTIImplBase<BasicTTIImpl> {
689 typedef BasicTTIImplBase<BasicTTIImpl> BaseT;
690 friend class BasicTTIImplBase<BasicTTIImpl>;
692 const TargetSubtargetInfo *ST;
693 const TargetLoweringBase *TLI;
695 const TargetSubtargetInfo *getST() const { return ST; }
696 const TargetLoweringBase *getTLI() const { return TLI; }
699 explicit BasicTTIImpl(const TargetMachine *ST, Function &F);
701 // Provide value semantics. MSVC requires that we spell all of these out.
702 BasicTTIImpl(const BasicTTIImpl &Arg)
703 : BaseT(static_cast<const BaseT &>(Arg)), ST(Arg.ST), TLI(Arg.TLI) {}
704 BasicTTIImpl(BasicTTIImpl &&Arg)
705 : BaseT(std::move(static_cast<BaseT &>(Arg))), ST(std::move(Arg.ST)),
706 TLI(std::move(Arg.TLI)) {}
707 BasicTTIImpl &operator=(const BasicTTIImpl &RHS) {
708 BaseT::operator=(static_cast<const BaseT &>(RHS));
713 BasicTTIImpl &operator=(BasicTTIImpl &&RHS) {
714 BaseT::operator=(std::move(static_cast<BaseT &>(RHS)));
715 ST = std::move(RHS.ST);
716 TLI = std::move(RHS.TLI);