Lines Matching refs:TLI
129 const TargetLowering *TLI; member in __anonebd7bfba0111::CodeGenPrepare
161 : FunctionPass(ID), TM(TM), TLI(nullptr), TTI(nullptr), DL(nullptr) { in CodeGenPrepare()
227 TLI = TM->getSubtargetImpl(F)->getTargetLowering(); in runOnFunction()
235 if (!OptSize && TLI && TLI->isSlowDivBypassed()) { in runOnFunction()
237 TLI->getBypassSlowDivWidths(); in runOnFunction()
806 static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI, in OptimizeNoopCopyExpression() argument
809 EVT SrcVT = TLI.getValueType(DL, CI->getOperand(0)->getType()); in OptimizeNoopCopyExpression()
810 EVT DstVT = TLI.getValueType(DL, CI->getType()); in OptimizeNoopCopyExpression()
823 if (TLI.getTypeAction(CI->getContext(), SrcVT) == in OptimizeNoopCopyExpression()
825 SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); in OptimizeNoopCopyExpression()
826 if (TLI.getTypeAction(CI->getContext(), DstVT) == in OptimizeNoopCopyExpression()
828 DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT); in OptimizeNoopCopyExpression()
890 static bool SinkCmpExpression(CmpInst *CI, const TargetLowering *TLI) { in SinkCmpExpression() argument
894 if (TLI && TLI->useSoftFloat() && isa<FCmpInst>(CI)) in SinkCmpExpression()
945 static bool OptimizeCmpExpression(CmpInst *CI, const TargetLowering *TLI) { in OptimizeCmpExpression() argument
946 if (SinkCmpExpression(CI, TLI)) in OptimizeCmpExpression()
978 const TargetLowering &TLI, const DataLayout &DL) { in SinkShiftAndTruncate() argument
994 int ISDOpcode = TLI.InstructionOpcodeToISD(TruncUser->getOpcode()); in SinkShiftAndTruncate()
1003 if (TLI.isOperationLegalOrCustom( in SinkShiftAndTruncate()
1004 ISDOpcode, TLI.getValueType(DL, TruncUser->getType(), true))) in SinkShiftAndTruncate()
1064 const TargetLowering &TLI, in OptimizeExtractBits() argument
1071 bool shiftIsLegal = TLI.isTypeLegal(TLI.getValueType(DL, ShiftI->getType())); in OptimizeExtractBits()
1109 (!TLI.isTypeLegal(TLI.getValueType(DL, User->getType())))) in OptimizeExtractBits()
1111 SinkShiftAndTruncate(ShiftI, User, CI, InsertedShifts, TLI, DL); in OptimizeExtractBits()
1674 const TargetLowering *TLI, in despeculateCountZeros() argument
1677 if (!TLI || !DL) in despeculateCountZeros()
1686 if ((IntrinsicID == Intrinsic::cttz && TLI->isCheapToSpeculateCttz()) || in despeculateCountZeros()
1687 (IntrinsicID == Intrinsic::ctlz && TLI->isCheapToSpeculateCtlz())) in despeculateCountZeros()
1741 if (TLI && isa<InlineAsm>(CI->getCalledValue())) { in optimizeCallInst()
1742 if (TLI->ExpandInlineAsm(CI)) { in optimizeCallInst()
1758 if (TLI && TLI->shouldAlignPointerArgs(CI, MinSize, PrefAlign)) { in optimizeCallInst()
1899 return despeculateCountZeros(II, TLI, DL, ModifiedDT); in optimizeCallInst()
1902 if (TLI) { in optimizeCallInst()
1909 if (TLI->GetAddrModeArguments(II, PtrOps, AccessTy, AddrSpace)) in optimizeCallInst()
1963 if (!TLI) in dupRetToEnableTailCallOpts()
2019 TLI->mayBeEmittedAsTailCall(CI)) in dupRetToEnableTailCallOpts()
2036 if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI)) in dupRetToEnableTailCallOpts()
2586 const TargetLowering &TLI; member in __anonebd7bfba0211::AddressingModeMatcher
2617 TLI(*TM.getSubtargetImpl(*MI->getParent()->getParent()) in AddressingModeMatcher()
2688 if (!TLI.isLegalAddressingMode(DL, TestAddrMode, AccessTy, AddrSpace)) in matchScaledValue()
2705 if (TLI.isLegalAddressingMode(DL, TestAddrMode, AccessTy, AddrSpace)) { in matchScaledValue()
2751 static bool isPromotedInstructionLegal(const TargetLowering &TLI, in isPromotedInstructionLegal() argument
2756 int ISDOpcode = TLI.InstructionOpcodeToISD(PromotedInst->getOpcode()); in isPromotedInstructionLegal()
2761 return TLI.isOperationLegalOrCustom( in isPromotedInstructionLegal()
2762 ISDOpcode, TLI.getValueType(DL, PromotedInst->getType())); in isPromotedInstructionLegal()
2800 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI);
2817 const TargetLowering &TLI, bool IsSExt);
2824 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in signExtendOperandForOther() argument
2826 Exts, Truncs, TLI, true); in signExtendOperandForOther()
2834 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in zeroExtendOperandForOther() argument
2836 Exts, Truncs, TLI, false); in zeroExtendOperandForOther()
2846 const TargetLowering &TLI);
2857 const TargetLowering &TLI,
2927 const TargetLowering &TLI, const InstrToOrigTy &PromotedInsts) { in getAction() argument
2953 if (!ExtOpnd->hasOneUse() && !TLI.isTruncateFree(ExtTy, ExtOpnd->getType())) in getAction()
2962 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in promoteOperandForTruncAndAnyExt() argument
2971 HasMergedNonFreeExt = !TLI.isExtFree(SExtOpnd); in promoteOperandForTruncAndAnyExt()
2994 CreatedInstsCost = !TLI.isExtFree(ExtInst) && !HasMergedNonFreeExt; in promoteOperandForTruncAndAnyExt()
3010 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI, in promoteOperandForOther() argument
3098 CreatedInstsCost += !TLI.isExtFree(ExtForOpnd); in promoteOperandForOther()
3130 return isPromotedInstructionLegal(TLI, DL, PromotedOperand); in isPromotionProfitable()
3162 if (TLI.getValueType(DL, AddrInst->getOperand(0)->getType()) == PtrTy) in matchOperationAddr()
3181 if (TLI.isNoopAddrSpaceCast(SrcAS, DestAS)) in matchOperationAddr()
3266 TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) { in matchOperationAddr()
3326 TypePromotionHelper::getAction(Ext, InsertedInsts, TLI, PromotedInsts); in matchOperationAddr()
3333 unsigned ExtCost = !TLI.isExtFree(Ext); in matchOperationAddr()
3335 TPH(Ext, TPT, PromotedInsts, CreatedInstsCost, nullptr, nullptr, TLI); in matchOperationAddr()
3389 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3396 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3440 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3450 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3465 const TargetLowering *TLI = TM.getSubtargetImpl(*F)->getTargetLowering(); in IsOperandAMemoryOperand() local
3468 TLI->ParseConstraints(F->getParent()->getDataLayout(), TRI, in IsOperandAMemoryOperand()
3474 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in IsOperandAMemoryOperand()
4055 TLI->ParseConstraints(*DL, TRI, CS); in optimizeInlineAsmInst()
4061 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in optimizeInlineAsmInst()
4076 static bool hasSameExtUse(Instruction *Inst, const TargetLowering &TLI) { in hasSameExtUse() argument
4115 if (!TLI.isZExtFree(NarrowTy, LargeTy)) in hasSameExtUse()
4159 if (!TLI || !TLI->enableExtLdPromotion() || DisableExtLdPromotion) in extLdPromotion()
4163 I, InsertedInsts, *TLI, PromotedInsts); in extLdPromotion()
4172 unsigned ExtCost = !TLI->isExtFree(I); in extLdPromotion()
4175 &NewExts, nullptr, *TLI); in extLdPromotion()
4189 !isPromotedInstructionLegal(*TLI, *DL, PromotedVal))) { in extLdPromotion()
4201 (LI->hasOneUse() || hasSameExtUse(LI, *TLI)))) in extLdPromotion()
4244 EVT VT = TLI->getValueType(*DL, I->getType()); in moveExtToFormExtLoad()
4245 EVT LoadVT = TLI->getValueType(*DL, LI->getType()); in moveExtToFormExtLoad()
4249 if (!LI->hasOneUse() && TLI && in moveExtToFormExtLoad()
4250 (TLI->isTypeLegal(LoadVT) || !TLI->isTypeLegal(VT)) && in moveExtToFormExtLoad()
4251 !TLI->isTruncateFree(I->getType(), LI->getType())) { in moveExtToFormExtLoad()
4265 if (TLI && !TLI->isLoadExtLegal(LType, VT, LoadVT)) { in moveExtToFormExtLoad()
4290 if (TLI && !TLI->isTruncateFree(I->getType(), Src->getType())) in optimizeExtUses()
4427 EVT LoadResultVT = TLI->getValueType(*DL, Load->getType()); in optimizeLoadExt()
4473 EVT TruncVT = TLI->getValueType(*DL, I->getType()); in optimizeLoadExt()
4503 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
4507 !TLI->isLoadExtLegal(ISD::ZEXTLOAD, LoadResultVT, TruncVT)) in optimizeLoadExt()
4547 const TargetLowering *TLI, in isFormingBranchFromSelectProfitable() argument
4550 if (!TLI->isPredictableSelectExpensive()) in isFormingBranchFromSelectProfitable()
4564 if (Probability > TLI->getPredictableBranchThreshold()) in isFormingBranchFromSelectProfitable()
4593 if (DisableSelectToBranch || OptSize || !TLI || VectorCond || in optimizeSelectInst()
4605 if (TLI->isSelectSupported(SelectKind) && in optimizeSelectInst()
4606 !isFormingBranchFromSelectProfitable(TTI, TLI, SI)) in optimizeSelectInst()
4725 if (!TLI || !TLI->isVectorShiftByScalarCheap(SVI->getType())) in optimizeShuffleVectorInst()
4773 if (!TLI || !DL) in optimizeSwitchInst()
4779 MVT RegType = TLI->getRegisterType(Context, TLI->getValueType(*DL, OldType)); in optimizeSwitchInst()
4836 const TargetLowering &TLI; member in __anonebd7bfba0411::VectorPromoteHelper
4907 if (!TLI.allowsMisalignedMemoryAccesses( in isProfitableToPromote()
4908 TLI.getValueType(DL, ST->getValueOperand()->getType()), AS, in isProfitableToPromote()
5004 VectorPromoteHelper(const DataLayout &DL, const TargetLowering &TLI, in VectorPromoteHelper() argument
5007 : DL(DL), TLI(TLI), TTI(TTI), Transition(Transition), in VectorPromoteHelper()
5038 int ISDOpcode = TLI.InstructionOpcodeToISD(ToBePromoted->getOpcode()); in shouldPromote()
5042 TLI.isOperationLegalOrCustom( in shouldPromote()
5043 ISDOpcode, TLI.getValueType(DL, getTransitionType(), true)); in shouldPromote()
5132 if (DisableStoreExtract || !TLI || in optimizeExtractElementInst()
5134 !TLI->canCombineStoreAndExtract(Inst->getOperand(0)->getType(), in optimizeExtractElementInst()
5147 VectorPromoteHelper VPH(*DL, *TLI, *TTI, Inst, CombineCost); in optimizeExtractElementInst()
5211 if (TLI && OptimizeNoopCopyExpression(CI, *TLI, *DL)) in optimizeInst()
5217 if (TLI && in optimizeInst()
5218 TLI->getTypeAction(CI->getContext(), in optimizeInst()
5219 TLI->getValueType(*DL, CI->getType())) == in optimizeInst()
5231 if (!TLI || !TLI->hasMultipleConditionRegisters()) in optimizeInst()
5232 return OptimizeCmpExpression(CI, TLI); in optimizeInst()
5236 if (TLI) { in optimizeInst()
5247 if (TLI) { in optimizeInst()
5260 if (TLI && CI && TLI->hasExtractBitsInsn()) in optimizeInst()
5261 return OptimizeExtractBits(BinOp, CI, *TLI, *DL); in optimizeInst()
5301 const TargetLowering &TLI) { in makeBitReverse() argument
5303 !TLI.isOperationLegalOrCustom(ISD::BITREVERSE, in makeBitReverse()
5304 TLI.getValueType(DL, I.getType(), true))) in makeBitReverse()
5331 while (TLI && MadeBitReverse) { in optimizeBlock()
5334 if (makeBitReverse(I, *DL, *TLI)) { in optimizeBlock()
5395 if (!TLI || !TLI->isMaskAndBranchFoldingLegal()) in sinkAndCmp()
5479 if (!TM || !TM->Options.EnableFastISel || !TLI || TLI->isJumpExpensive()) in splitBranchCondition()