Lines Matching refs:TLI

122     const TargetLowering *TLI;  member in __anonebd7bfba0111::CodeGenPrepare
153 : FunctionPass(ID), TM(TM), TLI(nullptr), TTI(nullptr), DL(nullptr) { in CodeGenPrepare()
218 TLI = TM->getSubtargetImpl(F)->getTargetLowering(); in runOnFunction()
225 if (!OptSize && TLI && TLI->isSlowDivBypassed()) { in runOnFunction()
227 TLI->getBypassSlowDivWidths(); in runOnFunction()
772 static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI, in OptimizeNoopCopyExpression() argument
775 EVT SrcVT = TLI.getValueType(DL, CI->getOperand(0)->getType()); in OptimizeNoopCopyExpression()
776 EVT DstVT = TLI.getValueType(DL, CI->getType()); in OptimizeNoopCopyExpression()
789 if (TLI.getTypeAction(CI->getContext(), SrcVT) == in OptimizeNoopCopyExpression()
791 SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); in OptimizeNoopCopyExpression()
792 if (TLI.getTypeAction(CI->getContext(), DstVT) == in OptimizeNoopCopyExpression()
794 DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT); in OptimizeNoopCopyExpression()
940 const TargetLowering &TLI, const DataLayout &DL) { in SinkShiftAndTruncate() argument
956 int ISDOpcode = TLI.InstructionOpcodeToISD(TruncUser->getOpcode()); in SinkShiftAndTruncate()
965 if (TLI.isOperationLegalOrCustom( in SinkShiftAndTruncate()
966 ISDOpcode, TLI.getValueType(DL, TruncUser->getType(), true))) in SinkShiftAndTruncate()
1026 const TargetLowering &TLI, in OptimizeExtractBits() argument
1033 bool shiftIsLegal = TLI.isTypeLegal(TLI.getValueType(DL, ShiftI->getType())); in OptimizeExtractBits()
1071 (!TLI.isTypeLegal(TLI.getValueType(DL, User->getType())))) in OptimizeExtractBits()
1073 SinkShiftAndTruncate(ShiftI, User, CI, InsertedShifts, TLI, DL); in OptimizeExtractBits()
1636 const TargetLowering *TLI, in despeculateCountZeros() argument
1639 if (!TLI || !DL) in despeculateCountZeros()
1648 if ((IntrinsicID == Intrinsic::cttz && TLI->isCheapToSpeculateCttz()) || in despeculateCountZeros()
1649 (IntrinsicID == Intrinsic::ctlz && TLI->isCheapToSpeculateCtlz())) in despeculateCountZeros()
1703 if (TLI && isa<InlineAsm>(CI->getCalledValue())) { in optimizeCallInst()
1704 if (TLI->ExpandInlineAsm(CI)) { in optimizeCallInst()
1720 if (TLI && TLI->shouldAlignPointerArgs(CI, MinSize, PrefAlign)) { in optimizeCallInst()
1841 return despeculateCountZeros(II, TLI, DL, ModifiedDT); in optimizeCallInst()
1844 if (TLI) { in optimizeCallInst()
1851 if (TLI->GetAddrModeArguments(II, PtrOps, AccessTy, AddrSpace)) in optimizeCallInst()
1905 if (!TLI) in dupRetToEnableTailCallOpts()
1961 TLI->mayBeEmittedAsTailCall(CI)) in dupRetToEnableTailCallOpts()
1978 if (CI && CI->use_empty() && TLI->mayBeEmittedAsTailCall(CI)) in dupRetToEnableTailCallOpts()
2528 const TargetLowering &TLI; member in __anonebd7bfba0211::AddressingModeMatcher
2559 TLI(*TM.getSubtargetImpl(*MI->getParent()->getParent()) in AddressingModeMatcher()
2630 if (!TLI.isLegalAddressingMode(DL, TestAddrMode, AccessTy, AddrSpace)) in matchScaledValue()
2647 if (TLI.isLegalAddressingMode(DL, TestAddrMode, AccessTy, AddrSpace)) { in matchScaledValue()
2693 static bool isPromotedInstructionLegal(const TargetLowering &TLI, in isPromotedInstructionLegal() argument
2698 int ISDOpcode = TLI.InstructionOpcodeToISD(PromotedInst->getOpcode()); in isPromotedInstructionLegal()
2703 return TLI.isOperationLegalOrCustom( in isPromotedInstructionLegal()
2704 ISDOpcode, TLI.getValueType(DL, PromotedInst->getType())); in isPromotedInstructionLegal()
2742 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI);
2759 const TargetLowering &TLI, bool IsSExt);
2766 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in signExtendOperandForOther() argument
2768 Exts, Truncs, TLI, true); in signExtendOperandForOther()
2776 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in zeroExtendOperandForOther() argument
2778 Exts, Truncs, TLI, false); in zeroExtendOperandForOther()
2788 const TargetLowering &TLI);
2799 const TargetLowering &TLI,
2869 const TargetLowering &TLI, const InstrToOrigTy &PromotedInsts) { in getAction() argument
2895 if (!ExtOpnd->hasOneUse() && !TLI.isTruncateFree(ExtTy, ExtOpnd->getType())) in getAction()
2904 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI) { in promoteOperandForTruncAndAnyExt() argument
2913 HasMergedNonFreeExt = !TLI.isExtFree(SExtOpnd); in promoteOperandForTruncAndAnyExt()
2936 CreatedInstsCost = !TLI.isExtFree(ExtInst) && !HasMergedNonFreeExt; in promoteOperandForTruncAndAnyExt()
2952 SmallVectorImpl<Instruction *> *Truncs, const TargetLowering &TLI, in promoteOperandForOther() argument
3040 CreatedInstsCost += !TLI.isExtFree(ExtForOpnd); in promoteOperandForOther()
3072 return isPromotedInstructionLegal(TLI, DL, PromotedOperand); in isPromotionProfitable()
3104 if (TLI.getValueType(DL, AddrInst->getOperand(0)->getType()) == PtrTy) in matchOperationAddr()
3123 if (TLI.isNoopAddrSpaceCast(SrcAS, DestAS)) in matchOperationAddr()
3208 TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) { in matchOperationAddr()
3268 TypePromotionHelper::getAction(Ext, InsertedInsts, TLI, PromotedInsts); in matchOperationAddr()
3275 unsigned ExtCost = !TLI.isExtFree(Ext); in matchOperationAddr()
3277 TPH(Ext, TPT, PromotedInsts, CreatedInstsCost, nullptr, nullptr, TLI); in matchOperationAddr()
3331 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3338 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3382 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3392 if (TLI.isLegalAddressingMode(DL, AddrMode, AccessTy, AddrSpace)) in matchAddr()
3407 const TargetLowering *TLI = TM.getSubtargetImpl(*F)->getTargetLowering(); in IsOperandAMemoryOperand() local
3410 TLI->ParseConstraints(F->getParent()->getDataLayout(), TRI, in IsOperandAMemoryOperand()
3416 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in IsOperandAMemoryOperand()
3971 TLI->ParseConstraints(*DL, TRI, CS); in optimizeInlineAsmInst()
3977 TLI->ComputeConstraintToUse(OpInfo, SDValue()); in optimizeInlineAsmInst()
3992 static bool hasSameExtUse(Instruction *Inst, const TargetLowering &TLI) { in hasSameExtUse() argument
4031 if (!TLI.isZExtFree(NarrowTy, LargeTy)) in hasSameExtUse()
4075 if (!TLI || !TLI->enableExtLdPromotion() || DisableExtLdPromotion) in extLdPromotion()
4079 I, InsertedInsts, *TLI, PromotedInsts); in extLdPromotion()
4088 unsigned ExtCost = !TLI->isExtFree(I); in extLdPromotion()
4091 &NewExts, nullptr, *TLI); in extLdPromotion()
4105 !isPromotedInstructionLegal(*TLI, *DL, PromotedVal))) { in extLdPromotion()
4117 (LI->hasOneUse() || hasSameExtUse(LI, *TLI)))) in extLdPromotion()
4160 EVT VT = TLI->getValueType(*DL, I->getType()); in moveExtToFormExtLoad()
4161 EVT LoadVT = TLI->getValueType(*DL, LI->getType()); in moveExtToFormExtLoad()
4165 if (!LI->hasOneUse() && TLI && in moveExtToFormExtLoad()
4166 (TLI->isTypeLegal(LoadVT) || !TLI->isTypeLegal(VT)) && in moveExtToFormExtLoad()
4167 !TLI->isTruncateFree(I->getType(), LI->getType())) { in moveExtToFormExtLoad()
4181 if (TLI && !TLI->isLoadExtLegal(LType, VT, LoadVT)) { in moveExtToFormExtLoad()
4206 if (TLI && !TLI->isTruncateFree(I->getType(), Src->getType())) in optimizeExtUses()
4343 EVT LoadResultVT = TLI->getValueType(*DL, Load->getType()); in optimizeLoadExt()
4389 EVT TruncVT = TLI->getValueType(*DL, I->getType()); in optimizeLoadExt()
4419 EVT TruncVT = TLI->getValueType(*DL, TruncTy); in optimizeLoadExt()
4423 !TLI->isLoadExtLegal(ISD::ZEXTLOAD, LoadResultVT, TruncVT)) in optimizeLoadExt()
4504 if (DisableSelectToBranch || OptSize || !TLI || VectorCond) in optimizeSelectInst()
4516 if (TLI->isSelectSupported(SelectKind)) { in optimizeSelectInst()
4519 if (!TLI->isPredictableSelectExpensive() || in optimizeSelectInst()
4640 if (!TLI || !TLI->isVectorShiftByScalarCheap(SVI->getType())) in optimizeShuffleVectorInst()
4688 if (!TLI || !DL) in optimizeSwitchInst()
4694 MVT RegType = TLI->getRegisterType(Context, TLI->getValueType(*DL, OldType)); in optimizeSwitchInst()
4751 const TargetLowering &TLI; member in __anonebd7bfba0411::VectorPromoteHelper
4822 if (!TLI.allowsMisalignedMemoryAccesses( in isProfitableToPromote()
4823 TLI.getValueType(DL, ST->getValueOperand()->getType()), AS, in isProfitableToPromote()
4919 VectorPromoteHelper(const DataLayout &DL, const TargetLowering &TLI, in VectorPromoteHelper() argument
4922 : DL(DL), TLI(TLI), TTI(TTI), Transition(Transition), in VectorPromoteHelper()
4953 int ISDOpcode = TLI.InstructionOpcodeToISD(ToBePromoted->getOpcode()); in shouldPromote()
4957 TLI.isOperationLegalOrCustom( in shouldPromote()
4958 ISDOpcode, TLI.getValueType(DL, getTransitionType(), true)); in shouldPromote()
5047 if (DisableStoreExtract || !TLI || in optimizeExtractElementInst()
5049 !TLI->canCombineStoreAndExtract(Inst->getOperand(0)->getType(), in optimizeExtractElementInst()
5062 VectorPromoteHelper VPH(*DL, *TLI, *TTI, Inst, CombineCost); in optimizeExtractElementInst()
5126 if (TLI && OptimizeNoopCopyExpression(CI, *TLI, *DL)) in optimizeInst()
5132 if (TLI && in optimizeInst()
5133 TLI->getTypeAction(CI->getContext(), in optimizeInst()
5134 TLI->getValueType(*DL, CI->getType())) == in optimizeInst()
5146 if (!TLI || !TLI->hasMultipleConditionRegisters()) in optimizeInst()
5151 if (TLI) { in optimizeInst()
5162 if (TLI) { in optimizeInst()
5175 if (TLI && CI && TLI->hasExtractBitsInsn()) in optimizeInst()
5176 return OptimizeExtractBits(BinOp, CI, *TLI, *DL); in optimizeInst()
5280 if (!TLI || !TLI->isMaskAndBranchFoldingLegal()) in sinkAndCmp()
5392 if (!TM || !TM->Options.EnableFastISel || !TLI || TLI->isJumpExpensive()) in splitBranchCondition()