Lines Matching refs:TLI
124 const TargetLowering *TLI; member in __anonebd7bfba0111::CodeGenPrepare
153 : FunctionPass(ID), TM(TM), TLI(nullptr), TTI(nullptr) { in CodeGenPrepare()
212 TLI = TM->getSubtargetImpl(F)->getTargetLowering(); in runOnFunction()
219 if (!OptSize && TLI && TLI->isSlowDivBypassed()) { in runOnFunction()
221 TLI->getBypassSlowDivWidths(); in runOnFunction()
720 static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){ in OptimizeNoopCopyExpression() argument
722 EVT SrcVT = TLI.getValueType(CI->getOperand(0)->getType()); in OptimizeNoopCopyExpression()
723 EVT DstVT = TLI.getValueType(CI->getType()); in OptimizeNoopCopyExpression()
736 if (TLI.getTypeAction(CI->getContext(), SrcVT) == in OptimizeNoopCopyExpression()
738 SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); in OptimizeNoopCopyExpression()
739 if (TLI.getTypeAction(CI->getContext(), DstVT) == in OptimizeNoopCopyExpression()
741 DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT); in OptimizeNoopCopyExpression()
888 const TargetLowering &TLI) { in SinkShiftAndTruncate() argument
904 int ISDOpcode = TLI.InstructionOpcodeToISD(TruncUser->getOpcode()); in SinkShiftAndTruncate()
913 if (TLI.isOperationLegalOrCustom( in SinkShiftAndTruncate()
914 ISDOpcode, TLI.getValueType(TruncUser->getType(), true))) in SinkShiftAndTruncate()
972 const TargetLowering &TLI) { in OptimizeExtractBits() argument
978 bool shiftIsLegal = TLI.isTypeLegal(TLI.getValueType(ShiftI->getType())); in OptimizeExtractBits()
1015 && (!TLI.isTypeLegal(TLI.getValueType(User->getType())))) in OptimizeExtractBits()
1017 SinkShiftAndTruncate(ShiftI, User, CI, InsertedShifts, TLI); in OptimizeExtractBits()
1260 if (TLI && isa<InlineAsm>(CI->getCalledValue())) { in OptimizeCallInst()
1261 if (TLI->ExpandInlineAsm(CI)) { in OptimizeCallInst()
1274 const DataLayout *TD = TLI ? TLI->getDataLayout() : nullptr; in OptimizeCallInst()
1279 if (TLI && TD && TLI->shouldAlignPointerArgs(CI, MinSize, PrefAlign)) { in OptimizeCallInst()
1367 if (TLI) { in OptimizeCallInst()
1370 if (TLI->GetAddrModeArguments(II, PtrOps, AccessTy)) in OptimizeCallInst()
1425 if (!TLI) in DupRetToEnableTailCallOpts()
1481 TLI->mayBeEmittedAsTailCall(CI)) in DupRetToEnableTailCallOpts()
1498 if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI)) in DupRetToEnableTailCallOpts()
2048 const TargetLowering &TLI; member in __anonebd7bfba0211::AddressingModeMatcher
2077 TLI(*TM.getSubtargetImpl(*MI->getParent()->getParent()) in AddressingModeMatcher()
2148 if (!TLI.isLegalAddressingMode(TestAddrMode, AccessTy)) in MatchScaledValue()
2165 if (TLI.isLegalAddressingMode(TestAddrMode, AccessTy)) { in MatchScaledValue()
2211 static bool isPromotedInstructionLegal(const TargetLowering &TLI, Value *Val) { in isPromotedInstructionLegal() argument
2215 int ISDOpcode = TLI.InstructionOpcodeToISD(PromotedInst->getOpcode()); in isPromotedInstructionLegal()
2220 return TLI.isOperationLegalOrCustom( in isPromotedInstructionLegal()
2221 ISDOpcode, TLI.getValueType(PromotedInst->getType())); in isPromotedInstructionLegal()
2261 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI);
2278 const TargetLowering &TLI, bool IsSExt);
2285 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in signExtendOperandForOther() argument
2287 Exts, Truncs, TLI, true); in signExtendOperandForOther()
2295 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in zeroExtendOperandForOther() argument
2297 Exts, Truncs, TLI, false); in zeroExtendOperandForOther()
2307 const TargetLowering &TLI);
2318 const TargetLowering &TLI,
2391 const TargetLowering &TLI, const InstrToOrigTy &PromotedInsts) { in getAction() argument
2417 if (!ExtOpnd->hasOneUse() && !TLI.isTruncateFree(ExtTy, ExtOpnd->getType())) in getAction()
2426 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in promoteOperandForTruncAndAnyExt() argument
2435 HasMergedNonFreeExt = !TLI.isExtFree(SExtOpnd); in promoteOperandForTruncAndAnyExt()
2458 CreatedInstsCost = !TLI.isExtFree(ExtInst) && !HasMergedNonFreeExt; in promoteOperandForTruncAndAnyExt()
2474 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI, in promoteOperandForOther() argument
2562 CreatedInstsCost += !TLI.isExtFree(ExtForOpnd); in promoteOperandForOther()
2595 return isPromotedInstructionLegal(TLI, PromotedOperand); in IsPromotionProfitable()
2625 if (TLI.getValueType(AddrInst->getOperand(0)->getType()) == in MatchOperationAddr()
2626 TLI.getPointerTy(AddrInst->getType()->getPointerAddressSpace())) in MatchOperationAddr()
2694 const DataLayout *TD = TLI.getDataLayout(); in MatchOperationAddr()
2722 if (ConstantOffset == 0 || TLI.isLegalAddressingMode(AddrMode, AccessTy)){ in MatchOperationAddr()
2782 TypePromotionHelper::getAction(Ext, InsertedTruncs, TLI, PromotedInsts); in MatchOperationAddr()
2789 unsigned ExtCost = !TLI.isExtFree(Ext); in MatchOperationAddr()
2791 TPH(Ext, TPT, PromotedInsts, CreatedInstsCost, nullptr, nullptr, TLI); in MatchOperationAddr()
2845 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
2852 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
2896 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
2906 if (TLI.isLegalAddressingMode(AddrMode, AccessTy)) in MatchAddr()
2922 const TargetLowering *TLI = TM.getSubtargetImpl(*F)->getTargetLowering(); in IsOperandAMemoryOperand() local
2925 TLI->ParseConstraints(TRI, ImmutableCallSite(CI)); in IsOperandAMemoryOperand()
2930 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in IsOperandAMemoryOperand()
3263 Type *IntPtrTy = TLI->getDataLayout()->getIntPtrType(Addr->getType()); in OptimizeMemoryInst()
3382 Type *IntPtrTy = TLI->getDataLayout()->getIntPtrType(Addr->getType()); in OptimizeMemoryInst()
3485 TargetConstraints = TLI->ParseConstraints(TRI, CS); in OptimizeInlineAsmInst()
3491 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in OptimizeInlineAsmInst()
3506 static bool hasSameExtUse(Instruction *Inst, const TargetLowering &TLI) { in hasSameExtUse() argument
3545 if (!TLI.isZExtFree(NarrowTy, LargeTy)) in hasSameExtUse()
3589 if (!TLI || !TLI->enableExtLdPromotion() || DisableExtLdPromotion) in ExtLdPromotion()
3593 I, InsertedTruncsSet, *TLI, PromotedInsts); in ExtLdPromotion()
3602 unsigned ExtCost = !TLI->isExtFree(I); in ExtLdPromotion()
3605 &NewExts, nullptr, *TLI); in ExtLdPromotion()
3619 !isPromotedInstructionLegal(*TLI, PromotedVal))) { in ExtLdPromotion()
3631 (LI->hasOneUse() || hasSameExtUse(LI, *TLI)))) in ExtLdPromotion()
3674 EVT VT = TLI->getValueType(I->getType()); in MoveExtToFormExtLoad()
3675 EVT LoadVT = TLI->getValueType(LI->getType()); in MoveExtToFormExtLoad()
3679 if (!LI->hasOneUse() && TLI && in MoveExtToFormExtLoad()
3680 (TLI->isTypeLegal(LoadVT) || !TLI->isTypeLegal(VT)) && in MoveExtToFormExtLoad()
3681 !TLI->isTruncateFree(I->getType(), LI->getType())) { in MoveExtToFormExtLoad()
3695 if (TLI && !TLI->isLoadExtLegal(LType, VT, LoadVT)) { in MoveExtToFormExtLoad()
3720 if (TLI && !TLI->isTruncateFree(I->getType(), Src->getType())) in OptimizeExtUses()
3816 if (DisableSelectToBranch || OptSize || !TLI || VectorCond) in OptimizeSelectInst()
3828 if (TLI->isSelectSupported(SelectKind)) { in OptimizeSelectInst()
3831 if (!TLI->isPredictableSelectExpensive() || in OptimizeSelectInst()
3889 if (!TLI || !TLI->isVectorShiftByScalarCheap(SVI->getType())) in OptimizeShuffleVectorInst()
3953 const TargetLowering &TLI; member in __anonebd7bfba0411::VectorPromoteHelper
4024 if (!TLI.allowsMisalignedMemoryAccesses( in isProfitableToPromote()
4025 TLI.getValueType(ST->getValueOperand()->getType()), AS, Align)) { in isProfitableToPromote()
4120 VectorPromoteHelper(const TargetLowering &TLI, const TargetTransformInfo &TTI, in VectorPromoteHelper() argument
4122 : TLI(TLI), TTI(TTI), Transition(Transition), in VectorPromoteHelper()
4153 int ISDOpcode = TLI.InstructionOpcodeToISD(ToBePromoted->getOpcode()); in shouldPromote()
4157 TLI.isOperationLegalOrCustom( in shouldPromote()
4158 ISDOpcode, TLI.getValueType(getTransitionType(), true)); in shouldPromote()
4247 if (DisableStoreExtract || !TLI || in OptimizeExtractElementInst()
4249 !TLI->canCombineStoreAndExtract(Inst->getOperand(0)->getType(), in OptimizeExtractElementInst()
4262 VectorPromoteHelper VPH(*TLI, *TTI, Inst, CombineCost); in OptimizeExtractElementInst()
4322 if (TLI && OptimizeNoopCopyExpression(CI, *TLI)) in OptimizeInst()
4328 if (TLI && TLI->getTypeAction(CI->getContext(), in OptimizeInst()
4329 TLI->getValueType(CI->getType())) == in OptimizeInst()
4341 if (!TLI || !TLI->hasMultipleConditionRegisters()) in OptimizeInst()
4345 if (TLI) in OptimizeInst()
4351 if (TLI) in OptimizeInst()
4362 if (TLI && CI && TLI->hasExtractBitsInsn()) in OptimizeInst()
4363 return OptimizeExtractBits(BinOp, CI, *TLI); in OptimizeInst()
4460 if (!TLI || !TLI->isMaskAndBranchFoldingLegal()) in sinkAndCmp()
4572 if (!TM || !TM->Options.EnableFastISel || !TLI || TLI->isJumpExpensive()) in splitBranchCondition()