class InstCombinerImpl
Declaration
class InstCombinerImpl : public InstCombiner, public InstVisitor { /* full declaration omitted */ };
Description
The core instruction combiner logic. This class provides both the logic to recursively visit instructions and combine them.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:61
Inherits from: InstCombiner, InstVisitor
Member Variables
Inherited from InstCombiner:
- public MaxArraySizeForCombine = 0
- public Builder
- protected Worklist
- protected MinimizeSize
- protected AA
- protected AC
- protected TLI
- protected DT
- protected DL
- protected SQ
- protected ORE
- protected BFI
- protected PSI
- protected LI
- protected MadeIRChange = false
Method Overview
- public unsigned int ComputeNumSignBits(const llvm::Value * Op, unsigned int Depth = 0, const llvm::Instruction * CxtI = nullptr) const
- public void CreateNonTerminatorUnreachable(llvm::Instruction * InsertAt)
- public llvm::Value * Descale(llvm::Value * Val, llvm::APInt Scale, bool & NoSignedWrap)
- private llvm::Value * EmitGEPOffset(llvm::User * GEP)
- public llvm::Value * EvaluateInDifferentType(llvm::Value * V, llvm::Type * Ty, bool isSigned)
- public llvm::Instruction * FoldOpIntoSelect(llvm::Instruction & Op, llvm::SelectInst * SI, bool FoldWithMultiUse = false)
- public llvm::Instruction * FoldShiftByConstant(llvm::Value * Op0, llvm::Constant * Op1, llvm::BinaryOperator & I)
- public llvm::Instruction * InsertNewInstBefore(llvm::Instruction * New, llvm::Instruction & Old)
- public llvm::Instruction * InsertNewInstWith(llvm::Instruction * New, llvm::Instruction & Old)
- public InstCombinerImpl(llvm::InstructionWorklist & Worklist, llvm::InstCombiner::BuilderTy & Builder, bool MinimizeSize, llvm::AAResults * AA, llvm::AssumptionCache & AC, llvm::TargetLibraryInfo & TLI, llvm::TargetTransformInfo & TTI, llvm::DominatorTree & DT, llvm::OptimizationRemarkEmitter & ORE, llvm::BlockFrequencyInfo * BFI, llvm::ProfileSummaryInfo * PSI, const llvm::DataLayout & DL, llvm::LoopInfo * LI)
- public bool MaskedValueIsZero(const llvm::Value * V, const llvm::APInt & Mask, unsigned int Depth = 0, const llvm::Instruction * CxtI = nullptr) const
- private bool OptimizeOverflowCheck(Instruction::BinaryOps BinaryOp, bool IsSigned, llvm::Value * LHS, llvm::Value * RHS, llvm::Instruction & CtxI, llvm::Value *& OperationResult, llvm::Constant *& OverflowResult)
- public llvm::Value * OptimizePointerDifference(llvm::Value * LHS, llvm::Value * RHS, llvm::Type * Ty, bool isNUW)
- public void PHIArgMergedDebugLoc(llvm::Instruction * Inst, llvm::PHINode & PN)
- public llvm::Instruction * PromoteCastOfAllocation(llvm::BitCastInst & CI, llvm::AllocaInst & AI)
- public llvm::Value * SimplifyAddWithRemainder(llvm::BinaryOperator & I)
- public llvm::Instruction * SimplifyAnyMemSet(llvm::AnyMemSetInst * MI)
- public llvm::Instruction * SimplifyAnyMemTransfer(llvm::AnyMemTransferInst * MI)
- public bool SimplifyAssociativeOrCommutative(llvm::BinaryOperator & I)
- public bool SimplifyDemandedBits(llvm::Instruction * I, unsigned int Op, const llvm::APInt & DemandedMask, llvm::KnownBits & Known, unsigned int Depth = 0)
- public bool SimplifyDemandedInstructionBits(llvm::Instruction & Inst)
- public llvm::Value * SimplifyDemandedUseBits(llvm::Value * V, llvm::APInt DemandedMask, llvm::KnownBits & Known, unsigned int Depth, llvm::Instruction * CxtI)
- public llvm::Value * SimplifyDemandedVectorElts(llvm::Value * V, llvm::APInt DemandedElts, llvm::APInt & UndefElts, unsigned int Depth = 0, bool AllowMultipleUsers = false)
- public llvm::Value * SimplifyMultipleUseDemandedBits(llvm::Instruction * I, const llvm::APInt & DemandedMask, llvm::KnownBits & Known, unsigned int Depth, llvm::Instruction * CxtI)
- public llvm::Value * SimplifySelectsFeedingBinaryOp(llvm::BinaryOperator & I, llvm::Value * LHS, llvm::Value * RHS)
- public llvm::Value * SimplifyUsingDistributiveLaws(llvm::BinaryOperator & I)
- public llvm::Instruction * SliceUpIllegalIntegerPHI(llvm::PHINode & PN)
- private bool annotateAnyAllocSite(llvm::CallBase & Call, const llvm::TargetLibraryInfo * TLI)
- public llvm::Instruction * canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(llvm::BinaryOperator & I)
- public llvm::CmpInst * canonicalizeICmpPredicate(llvm::CmpInst & I)
- public llvm::LoadInst * combineLoadToNewType(llvm::LoadInst & LI, llvm::Type * NewTy, const llvm::Twine & Suffix = "")
- public llvm::Instruction * commonCastTransforms(llvm::CastInst & CI)
- public llvm::Instruction * commonIDivTransforms(llvm::BinaryOperator & I)
- public llvm::Instruction * commonIRemTransforms(llvm::BinaryOperator & I)
- public llvm::Instruction * commonPointerCastTransforms(llvm::CastInst & CI)
- public llvm::Instruction * commonShiftTransforms(llvm::BinaryOperator & I)
- public llvm::KnownBits computeKnownBits(const llvm::Value * V, unsigned int Depth, const llvm::Instruction * CxtI) const
- public void computeKnownBits(const llvm::Value * V, llvm::KnownBits & Known, unsigned int Depth, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflow(Instruction::BinaryOps BinaryOp, bool IsSigned, llvm::Value * LHS, llvm::Value * RHS, llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForSignedAdd(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForSignedMul(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForSignedSub(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForUnsignedAdd(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForUnsignedMul(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public llvm::OverflowResult computeOverflowForUnsignedSub(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction * CxtI) const
- public bool dominatesAllUses(const llvm::Instruction * DI, const llvm::Instruction * UI, const llvm::BasicBlock * DB) const
- private llvm::Value * dyn_castNegVal(llvm::Value * V) const
- public llvm::Instruction * eraseInstFromFunction(llvm::Instruction & I)
- public llvm::Instruction * foldAddWithConstant(llvm::BinaryOperator & Add)
- public llvm::Instruction * foldAggregateConstructionIntoAggregateReuse(llvm::InsertValueInst & OrigIVI)
- public llvm::Instruction * foldAllocaCmp(llvm::ICmpInst & ICI, const llvm::AllocaInst * Alloca)
- private llvm::Value * foldAndOrOfICmps(llvm::ICmpInst * LHS, llvm::ICmpInst * RHS, llvm::Instruction & I, bool IsAnd, bool IsLogical = false)
- private llvm::Value * foldAndOrOfICmpsOfAndWithPow2(llvm::ICmpInst * LHS, llvm::ICmpInst * RHS, llvm::Instruction * CxtI, bool IsAnd, bool IsLogical = false)
- private llvm::Value * foldAndOrOfICmpsUsingRanges(llvm::ICmpInst * ICmp1, llvm::ICmpInst * ICmp2, bool IsAnd)
- private llvm::Instruction * foldAndOrOfSelectUsingImpliedCond(llvm::Value * Op, llvm::SelectInst & SI, bool IsAnd)
- public llvm::Instruction * foldBinOpIntoSelectOrPhi(llvm::BinaryOperator & I)
- private llvm::Instruction * foldBinopOfSextBoolToSelect(llvm::BinaryOperator & I)
- public llvm::Instruction * foldBinopWithPhiOperands(llvm::BinaryOperator & BO)
- private llvm::Instruction * foldBitcastExtElt(llvm::ExtractElementInst & ExtElt)
- private llvm::Instruction * foldCastedBitwiseLogic(llvm::BinaryOperator & I)
- public llvm::Instruction * foldCmpLoadFromIndexedGlobal(llvm::LoadInst * LI, llvm::GetElementPtrInst * GEP, llvm::GlobalVariable * GV, llvm::CmpInst & ICI, llvm::ConstantInt * AndCst = nullptr)
- private llvm::Value * foldEqOfParts(llvm::ICmpInst * Cmp0, llvm::ICmpInst * Cmp1, bool IsAnd)
- public llvm::Instruction * foldFCmpIntToFPConst(llvm::FCmpInst & I, llvm::Instruction * LHSI, llvm::Constant * RHSC)
- private llvm::Instruction * foldFPSignBitOps(llvm::BinaryOperator & I)
- public llvm::Instruction * foldFreezeIntoRecurrence(llvm::FreezeInst & I, llvm::PHINode * PN)
- public llvm::Instruction * foldGEPICmp(llvm::GEPOperator * GEPLHS, llvm::Value * RHS, ICmpInst::Predicate Cond, llvm::Instruction & I)
- public llvm::Instruction * foldICmpAddConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Add, const llvm::APInt & C)
- public llvm::Instruction * foldICmpAddOpConst(llvm::Value * X, const llvm::APInt & C, ICmpInst::Predicate Pred)
- public llvm::Instruction * foldICmpAndConstConst(llvm::ICmpInst & Cmp, llvm::BinaryOperator * And, const llvm::APInt & C1)
- public llvm::Instruction * foldICmpAndConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * And, const llvm::APInt & C)
- public llvm::Instruction * foldICmpAndShift(llvm::ICmpInst & Cmp, llvm::BinaryOperator * And, const llvm::APInt & C1, const llvm::APInt & C2)
- public llvm::Instruction * foldICmpBinOp(llvm::ICmpInst & Cmp, const llvm::SimplifyQuery & SQ)
- public llvm::Instruction * foldICmpBinOpEqualityWithConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * BO, const llvm::APInt & C)
- public llvm::Instruction * foldICmpBinOpWithConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * BO, const llvm::APInt & C)
- public llvm::Instruction * foldICmpBitCast(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpDivConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Div, const llvm::APInt & C)
- public llvm::Instruction * foldICmpEqIntrinsicWithConstant(llvm::ICmpInst & ICI, llvm::IntrinsicInst * II, const llvm::APInt & C)
- public llvm::Instruction * foldICmpEquality(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpInstWithConstant(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpInstWithConstantAllowUndef(llvm::ICmpInst & Cmp, const llvm::APInt & C)
- public llvm::Instruction * foldICmpInstWithConstantNotInt(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpIntrinsicWithConstant(llvm::ICmpInst & ICI, llvm::IntrinsicInst * II, const llvm::APInt & C)
- public llvm::Instruction * foldICmpMulConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Mul, const llvm::APInt & C)
- public llvm::Instruction * foldICmpOrConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Or, const llvm::APInt & C)
- public llvm::Instruction * foldICmpSRemConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * UDiv, const llvm::APInt & C)
- public llvm::Instruction * foldICmpSelectConstant(llvm::ICmpInst & Cmp, llvm::SelectInst * Select, llvm::ConstantInt * C)
- public llvm::Instruction * foldICmpShlConstConst(llvm::ICmpInst & I, llvm::Value * ShAmt, const llvm::APInt & C1, const llvm::APInt & C2)
- public llvm::Instruction * foldICmpShlConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Shl, const llvm::APInt & C)
- public llvm::Instruction * foldICmpShrConstConst(llvm::ICmpInst & I, llvm::Value * ShAmt, const llvm::APInt & C1, const llvm::APInt & C2)
- public llvm::Instruction * foldICmpShrConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Shr, const llvm::APInt & C)
- public llvm::Instruction * foldICmpSubConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Sub, const llvm::APInt & C)
- public llvm::Instruction * foldICmpTruncConstant(llvm::ICmpInst & Cmp, llvm::TruncInst * Trunc, const llvm::APInt & C)
- public llvm::Instruction * foldICmpUDivConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * UDiv, const llvm::APInt & C)
- public llvm::Instruction * foldICmpUsingKnownBits(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpWithCastOp(llvm::ICmpInst & ICmp)
- public llvm::Instruction * foldICmpWithConstant(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpWithDominatingICmp(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpWithZero(llvm::ICmpInst & Cmp)
- public llvm::Instruction * foldICmpWithZextOrSext(llvm::ICmpInst & ICmp)
- public llvm::Instruction * foldICmpXorConstant(llvm::ICmpInst & Cmp, llvm::BinaryOperator * Xor, const llvm::APInt & C)
- public llvm::Instruction * foldIRemByPowerOfTwoToBitTest(llvm::ICmpInst & I)
- public llvm::Instruction * foldIntegerTypedPHI(llvm::PHINode & PN)
- private llvm::Instruction * foldIntrinsicWithOverflowCommon(llvm::IntrinsicInst * II)
- public llvm::Instruction * foldItoFPtoI(llvm::CastInst & FI)
- private llvm::Value * foldLogicOfFCmps(llvm::FCmpInst * LHS, llvm::FCmpInst * RHS, bool IsAnd, bool IsLogicalSelect = false)
- public llvm::Value * foldMultiplicationOverflowCheck(llvm::ICmpInst & Cmp)
- private llvm::Instruction * foldNot(llvm::BinaryOperator & I)
- public llvm::Instruction * foldOpIntoPhi(llvm::Instruction & I, llvm::PHINode * PN)
- public llvm::Instruction * foldPHIArgBinOpIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgExtractValueInstructionIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgGEPIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgInsertValueInstructionIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgIntToPtrToPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgLoadIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgOpIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldPHIArgZextsIntoPHI(llvm::PHINode & PN)
- public llvm::Instruction * foldSPFofSPF(llvm::Instruction * Inner, llvm::SelectPatternFlavor SPF1, llvm::Value * A, llvm::Value * B, llvm::Instruction & Outer, llvm::SelectPatternFlavor SPF2, llvm::Value * C)
- public llvm::Instruction * foldSelectExtConst(llvm::SelectInst & Sel)
- public llvm::Instruction * foldSelectICmp(ICmpInst::Predicate Pred, llvm::SelectInst * SI, llvm::Value * RHS, const llvm::ICmpInst & I)
- public llvm::Instruction * foldSelectInstWithICmp(llvm::SelectInst & SI, llvm::ICmpInst * ICI)
- public llvm::Instruction * foldSelectIntoOp(llvm::SelectInst & SI, llvm::Value *, llvm::Value *)
- public llvm::Instruction * foldSelectOpOp(llvm::SelectInst & SI, llvm::Instruction * TI, llvm::Instruction * FI)
- public llvm::Instruction * foldSelectShuffle(llvm::ShuffleVectorInst & Shuf)
- public llvm::Instruction * foldSelectValueEquivalence(llvm::SelectInst & SI, llvm::ICmpInst & ICI)
- public llvm::Instruction * foldSignBitTest(llvm::ICmpInst & I)
- public llvm::Instruction * foldVariableSignZeroExtensionOfVariableHighBitExtract(llvm::BinaryOperator & OldAShr)
- public llvm::Instruction * foldVectorBinop(llvm::BinaryOperator & Inst)
- public llvm::Instruction * foldVectorSelect(llvm::SelectInst & Sel)
- private llvm::Value * foldXorOfICmps(llvm::ICmpInst * LHS, llvm::ICmpInst * RHS, llvm::BinaryOperator & Xor)
- private void freelyInvertAllUsersOf(llvm::Value * V)
- public bool freezeOtherUses(llvm::FreezeInst & FI)
- private llvm::Value * getSelectCondition(llvm::Value * A, llvm::Value * B)
- public llvm::Value * insertRangeTest(llvm::Value * V, const llvm::APInt & Lo, const llvm::APInt & Hi, bool isSigned, bool Inside)
- private bool isDesirableIntType(unsigned int BitWidth) const
- private Instruction::CastOps isEliminableCastPair(const llvm::CastInst * CI1, const llvm::CastInst * CI2)
- public bool isKnownToBeAPowerOfTwo(const llvm::Value * V, bool OrZero = false, unsigned int Depth = 0, const llvm::Instruction * CxtI = nullptr)
- public llvm::Instruction * matchBSwapOrBitReverse(llvm::Instruction & I, bool MatchBSwaps, bool MatchBitReversals)
- private llvm::Instruction * matchSAddSubSat(llvm::IntrinsicInst & MinMax1)
- private llvm::Value * matchSelectFromAndOr(llvm::Value * A, llvm::Value * B, llvm::Value * C, llvm::Value * D)
- public bool matchThreeWayIntCompare(llvm::SelectInst * SI, llvm::Value *& LHS, llvm::Value *& RHS, llvm::ConstantInt *& Less, llvm::ConstantInt *& Equal, llvm::ConstantInt *& Greater)
- public bool mergeStoreIntoSuccessor(llvm::StoreInst & SI)
- private llvm::Instruction * narrowBinOp(llvm::TruncInst & Trunc)
- private llvm::Instruction * narrowFunnelShift(llvm::TruncInst & Trunc)
- private llvm::Instruction * narrowMaskedBinOp(llvm::BinaryOperator & And)
- private llvm::Instruction * narrowMathIfNoOverflow(llvm::BinaryOperator & I)
- private llvm::Instruction * optimizeBitCastFromPhi(llvm::CastInst & CI, llvm::PHINode * PN)
- public llvm::Value * pushFreezeToPreventPoisonFromPropagating(llvm::FreezeInst & FI)
- public llvm::Value * reassociateShiftAmtsOfTwoSameDirectionShifts(llvm::BinaryOperator * Sh0, const llvm::SimplifyQuery & SQ, bool AnalyzeForSignBitExtraction = false)
- public llvm::Instruction * replaceInstUsesWith(llvm::Instruction & I, llvm::Value * V)
- public llvm::Instruction * replaceOperand(llvm::Instruction & I, unsigned int OpNum, llvm::Value * V)
- public void replaceUse(llvm::Use & U, llvm::Value * NewValue)
- public bool replacedSelectWithOperand(llvm::SelectInst * SI, const llvm::ICmpInst * Icmp, const unsigned int SIOpd)
- public bool run()
- private llvm::Instruction * scalarizePHI(llvm::ExtractElementInst & EI, llvm::PHINode * PN)
- private bool shouldChangeType(unsigned int FromBitWidth, unsigned int ToBitWidth) const
- private bool shouldChangeType(llvm::Type * From, llvm::Type * To) const
- private bool shouldOptimizeCast(llvm::CastInst * CI)
- public bool simplifyDivRemOfSelectWithZeroOp(llvm::BinaryOperator & I)
- private llvm::Value * simplifyIntToPtrRoundTripCast(llvm::Value * Val)
- private llvm::Instruction * simplifyMaskedGather(llvm::IntrinsicInst & II)
- private llvm::Value * simplifyMaskedLoad(llvm::IntrinsicInst & II)
- private llvm::Instruction * simplifyMaskedScatter(llvm::IntrinsicInst & II)
- private llvm::Instruction * simplifyMaskedStore(llvm::IntrinsicInst & II)
- public llvm::Value * simplifyRangeCheck(llvm::ICmpInst * Cmp0, llvm::ICmpInst * Cmp1, bool Inverted)
- public llvm::Value * simplifyShrShlDemandedBits(llvm::Instruction * Shr, const llvm::APInt & ShrOp1, llvm::Instruction * Shl, const llvm::APInt & ShlOp1, const llvm::APInt & DemandedMask, llvm::KnownBits & Known)
- public bool sinkNotIntoOtherHandOfAndOrOr(llvm::BinaryOperator & I)
- private llvm::Instruction * transformCallThroughTrampoline(llvm::CallBase & Call, llvm::IntrinsicInst & Tramp)
- private bool transformConstExprCastCall(llvm::CallBase & Call)
- private llvm::Instruction * transformSExtICmp(llvm::ICmpInst * ICI, llvm::Instruction & CI)
- private llvm::Instruction * transformZExtICmp(llvm::ICmpInst * ICI, llvm::ZExtInst & CI)
- public llvm::Value * tryFactorization(llvm::BinaryOperator &, Instruction::BinaryOps, llvm::Value *, llvm::Value *, llvm::Value *, llvm::Value *)
- private llvm::Instruction * tryOptimizeCall(llvm::CallInst * CI)
- public llvm::Instruction * visitAShr(llvm::BinaryOperator & I)
- public llvm::Instruction * visitAdd(llvm::BinaryOperator & I)
- public llvm::Instruction * visitAddrSpaceCast(llvm::AddrSpaceCastInst & CI)
- public llvm::Instruction * visitAllocSite(llvm::Instruction & FI)
- public llvm::Instruction * visitAllocaInst(llvm::AllocaInst & AI)
- public llvm::Instruction * visitAnd(llvm::BinaryOperator & I)
- public llvm::Instruction * visitAtomicRMWInst(llvm::AtomicRMWInst & SI)
- public llvm::Instruction * visitBitCast(llvm::BitCastInst & CI)
- public llvm::Instruction * visitBranchInst(llvm::BranchInst & BI)
- private llvm::Instruction * visitCallBase(llvm::CallBase & Call)
- public llvm::Instruction * visitCallBrInst(llvm::CallBrInst & CBI)
- public llvm::Instruction * visitCallInst(llvm::CallInst & CI)
- public llvm::Instruction * visitExtractElementInst(llvm::ExtractElementInst & EI)
- public llvm::Instruction * visitExtractValueInst(llvm::ExtractValueInst & EV)
- public llvm::Instruction * visitFAdd(llvm::BinaryOperator & I)
- public llvm::Instruction * visitFCmpInst(llvm::FCmpInst & I)
- public llvm::Instruction * visitFDiv(llvm::BinaryOperator & I)
- public llvm::Instruction * visitFMul(llvm::BinaryOperator & I)
- public llvm::Instruction * visitFNeg(llvm::UnaryOperator & I)
- public llvm::Instruction * visitFPExt(llvm::CastInst & CI)
- public llvm::Instruction * visitFPToSI(llvm::FPToSIInst & FI)
- public llvm::Instruction * visitFPToUI(llvm::FPToUIInst & FI)
- public llvm::Instruction * visitFPTrunc(llvm::FPTruncInst & CI)
- public llvm::Instruction * visitFRem(llvm::BinaryOperator & I)
- public llvm::Instruction * visitFSub(llvm::BinaryOperator & I)
- public llvm::Instruction * visitFenceInst(llvm::FenceInst & FI)
- public llvm::Instruction * visitFree(llvm::CallInst & FI, llvm::Value * FreedOp)
- public llvm::Instruction * visitFreeze(llvm::FreezeInst & I)
- public llvm::Instruction * visitGEPOfBitcast(llvm::BitCastInst * BCI, llvm::GetElementPtrInst & GEP)
- public llvm::Instruction * visitGEPOfGEP(llvm::GetElementPtrInst & GEP, llvm::GEPOperator * Src)
- public llvm::Instruction * visitGetElementPtrInst(llvm::GetElementPtrInst & GEP)
- public llvm::Instruction * visitICmpInst(llvm::ICmpInst & I)
- public llvm::Instruction * visitInsertElementInst(llvm::InsertElementInst & IE)
- public llvm::Instruction * visitInsertValueInst(llvm::InsertValueInst & IV)
- public llvm::Instruction * visitInstruction(llvm::Instruction & I)
- public llvm::Instruction * visitIntToPtr(llvm::IntToPtrInst & CI)
- public llvm::Instruction * visitInvokeInst(llvm::InvokeInst & II)
- public llvm::Instruction * visitLShr(llvm::BinaryOperator & I)
- public llvm::Instruction * visitLandingPadInst(llvm::LandingPadInst & LI)
- public llvm::Instruction * visitLoadInst(llvm::LoadInst & LI)
- public llvm::Instruction * visitMul(llvm::BinaryOperator & I)
- public llvm::Instruction * visitOr(llvm::BinaryOperator & I)
- public llvm::Instruction * visitPHINode(llvm::PHINode & PN)
- public llvm::Instruction * visitPtrToInt(llvm::PtrToIntInst & CI)
- public llvm::Instruction * visitReturnInst(llvm::ReturnInst & RI)
- public llvm::Instruction * visitSDiv(llvm::BinaryOperator & I)
- public llvm::Instruction * visitSExt(llvm::SExtInst & CI)
- public llvm::Instruction * visitSIToFP(llvm::CastInst & CI)
- public llvm::Instruction * visitSRem(llvm::BinaryOperator & I)
- public llvm::Instruction * visitSelectInst(llvm::SelectInst & SI)
- public llvm::Instruction * visitShl(llvm::BinaryOperator & I)
- public llvm::Instruction * visitShuffleVectorInst(llvm::ShuffleVectorInst & SVI)
- public llvm::Instruction * visitStoreInst(llvm::StoreInst & SI)
- public llvm::Instruction * visitSub(llvm::BinaryOperator & I)
- public llvm::Instruction * visitSwitchInst(llvm::SwitchInst & SI)
- public llvm::Instruction * visitTrunc(llvm::TruncInst & CI)
- public llvm::Instruction * visitUDiv(llvm::BinaryOperator & I)
- public llvm::Instruction * visitUIToFP(llvm::CastInst & CI)
- public llvm::Instruction * visitURem(llvm::BinaryOperator & I)
- public llvm::Instruction * visitUnconditionalBranchInst(llvm::BranchInst & BI)
- public llvm::Instruction * visitUnreachableInst(llvm::UnreachableInst & I)
- public llvm::Instruction * visitVAEndInst(llvm::VAEndInst & I)
- public llvm::Instruction * visitXor(llvm::BinaryOperator & I)
- public llvm::Instruction * visitZExt(llvm::ZExtInst & CI)
- private bool willNotOverflow(BinaryOperator::BinaryOps Opcode, const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI, bool IsSigned) const
- private bool willNotOverflowAdd(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI, bool IsSigned) const
- private bool willNotOverflowMul(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI, bool IsSigned) const
- private bool willNotOverflowSignedAdd(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- private bool willNotOverflowSignedMul(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- private bool willNotOverflowSignedSub(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- private bool willNotOverflowSub(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI, bool IsSigned) const
- private bool willNotOverflowUnsignedAdd(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- private bool willNotOverflowUnsignedMul(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- private bool willNotOverflowUnsignedSub(const llvm::Value * LHS, const llvm::Value * RHS, const llvm::Instruction & CxtI) const
- public virtual ~InstCombinerImpl()
Inherited from InstCombiner:
- public AddOne
- public ComputeMaxSignificantBits
- public ComputeNumSignBits
- public InsertNewInstBefore
- public InsertNewInstWith
- public MaskedValueIsZero
- public SimplifyDemandedBits
- public SimplifyDemandedVectorElts
- public SubOne
- public addToWorklist
- public canFreelyInvertAllUsersOf
- public computeKnownBits
- public computeKnownBits
- public computeOverflowForSignedAdd
- public computeOverflowForSignedMul
- public computeOverflowForSignedSub
- public computeOverflowForUnsignedAdd
- public computeOverflowForUnsignedMul
- public computeOverflowForUnsignedSub
- public eraseInstFromFunction
- public getAssumptionCache
- public getBlockFrequencyInfo
- public getComplexity
- public getDataLayout
- public getDominatorTree
- public getFlippedStrictnessPredicateAndConstant
- public getLoopInfo
- public getOptimizationRemarkEmitter
- public getProfileSummaryInfo
- public getSafeVectorConstantForBinop
- public getSimplifyQuery
- public getTargetLibraryInfo
- public isCanonicalPredicate
- public isFreeToInvert
- public isKnownToBeAPowerOfTwo
- public isSignBitCheck
- public peekThroughBitcast
- public replaceInstUsesWith
- public replaceOperand
- public replaceUse
- public shouldAvoidAbsorbingNotIntoSelect
- public targetInstCombineIntrinsic
- public targetSimplifyDemandedUseBitsIntrinsic
- public targetSimplifyDemandedVectorEltsIntrinsic
Methods
¶unsigned int ComputeNumSignBits(
const llvm::Value* Op,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr) const
unsigned int ComputeNumSignBits(
const llvm::Value* Op,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:491
Parameters
- const llvm::Value* Op
- unsigned int Depth = 0
- const llvm::Instruction* CxtI = nullptr
¶void CreateNonTerminatorUnreachable(
llvm::Instruction* InsertAt)
void CreateNonTerminatorUnreachable(
llvm::Instruction* InsertAt)
Description
Create and insert the idiom we use to indicate a block is unreachable without having to rewrite the CFG from within InstCombine.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:440
Parameters
- llvm::Instruction* InsertAt
¶llvm::Value* Descale(llvm::Value* Val,
llvm::APInt Scale,
bool& NoSignedWrap)
llvm::Value* Descale(llvm::Value* Val,
llvm::APInt Scale,
bool& NoSignedWrap)
Description
Returns a value X such that Val = X * Scale, or null if none. If the multiplication is known not to overflow then NoSignedWrap is set.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:762
Parameters
- llvm::Value* Val
- llvm::APInt Scale
- bool& NoSignedWrap
¶llvm::Value* EmitGEPOffset(llvm::User* GEP)
llvm::Value* EmitGEPOffset(llvm::User* GEP)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:319
Parameters
- llvm::User* GEP
¶llvm::Value* EvaluateInDifferentType(
llvm::Value* V,
llvm::Type* Ty,
bool isSigned)
llvm::Value* EvaluateInDifferentType(
llvm::Value* V,
llvm::Type* Ty,
bool isSigned)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:757
Parameters
- llvm::Value* V
- llvm::Type* Ty
- bool isSigned
¶llvm::Instruction* FoldOpIntoSelect(
llvm::Instruction& Op,
llvm::SelectInst* SI,
bool FoldWithMultiUse = false)
llvm::Instruction* FoldOpIntoSelect(
llvm::Instruction& Op,
llvm::SelectInst* SI,
bool FoldWithMultiUse = false)
Description
Given an instruction with a select as one operand and a constant as the other operand, try to fold the binary operator into the select arguments. This also works for Cast instructions, which obviously do not have a second operand.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:628
Parameters
- llvm::Instruction& Op
- llvm::SelectInst* SI
- bool FoldWithMultiUse = false
¶llvm::Instruction* FoldShiftByConstant(
llvm::Value* Op0,
llvm::Constant* Op1,
llvm::BinaryOperator& I)
llvm::Instruction* FoldShiftByConstant(
llvm::Value* Op0,
llvm::Constant* Op1,
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:125
Parameters
- llvm::Value* Op0
- llvm::Constant* Op1
- llvm::BinaryOperator& I
¶llvm::Instruction* InsertNewInstBefore(
llvm::Instruction* New,
llvm::Instruction& Old)
llvm::Instruction* InsertNewInstBefore(
llvm::Instruction* New,
llvm::Instruction& Old)
Description
Inserts an instruction \p New before instruction \p Old Also adds the new instruction to the worklist and returns \p New so that it is suitable for use as the return from the visitation patterns.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:384
Parameters
- llvm::Instruction* New
- llvm::Instruction& Old
¶llvm::Instruction* InsertNewInstWith(
llvm::Instruction* New,
llvm::Instruction& Old)
llvm::Instruction* InsertNewInstWith(
llvm::Instruction* New,
llvm::Instruction& Old)
Description
Same as InsertNewInstBefore, but also sets the debug loc.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:394
Parameters
- llvm::Instruction* New
- llvm::Instruction& Old
¶InstCombinerImpl(
llvm::InstructionWorklist& Worklist,
llvm::InstCombiner::BuilderTy& Builder,
bool MinimizeSize,
llvm::AAResults* AA,
llvm::AssumptionCache& AC,
llvm::TargetLibraryInfo& TLI,
llvm::TargetTransformInfo& TTI,
llvm::DominatorTree& DT,
llvm::OptimizationRemarkEmitter& ORE,
llvm::BlockFrequencyInfo* BFI,
llvm::ProfileSummaryInfo* PSI,
const llvm::DataLayout& DL,
llvm::LoopInfo* LI)
InstCombinerImpl(
llvm::InstructionWorklist& Worklist,
llvm::InstCombiner::BuilderTy& Builder,
bool MinimizeSize,
llvm::AAResults* AA,
llvm::AssumptionCache& AC,
llvm::TargetLibraryInfo& TLI,
llvm::TargetTransformInfo& TTI,
llvm::DominatorTree& DT,
llvm::OptimizationRemarkEmitter& ORE,
llvm::BlockFrequencyInfo* BFI,
llvm::ProfileSummaryInfo* PSI,
const llvm::DataLayout& DL,
llvm::LoopInfo* LI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:65
Parameters
- llvm::InstructionWorklist& Worklist
- llvm::InstCombiner::BuilderTy& Builder
- bool MinimizeSize
- llvm::AAResults* AA
- llvm::AssumptionCache& AC
- llvm::TargetLibraryInfo& TLI
- llvm::TargetTransformInfo& TTI
- llvm::DominatorTree& DT
- llvm::OptimizationRemarkEmitter& ORE
- llvm::BlockFrequencyInfo* BFI
- llvm::ProfileSummaryInfo* PSI
- const llvm::DataLayout& DL
- llvm::LoopInfo* LI
¶bool MaskedValueIsZero(
const llvm::Value* V,
const llvm::APInt& Mask,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr) const
bool MaskedValueIsZero(
const llvm::Value* V,
const llvm::APInt& Mask,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:486
Parameters
- const llvm::Value* V
- const llvm::APInt& Mask
- unsigned int Depth = 0
- const llvm::Instruction* CxtI = nullptr
¶bool OptimizeOverflowCheck(
Instruction::BinaryOps BinaryOp,
bool IsSigned,
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Instruction& CtxI,
llvm::Value*& OperationResult,
llvm::Constant*& OverflowResult)
bool OptimizeOverflowCheck(
Instruction::BinaryOps BinaryOp,
bool IsSigned,
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Instruction& CtxI,
llvm::Value*& OperationResult,
llvm::Constant*& OverflowResult)
Description
Try to optimize a sequence of instructions checking if an operation on LHS and RHS overflows. If this overflow check is done via one of the overflow check intrinsics, then CtxI has to be the call instruction calling that intrinsic. If this overflow check is done by arithmetic followed by a compare, then CtxI has to be the arithmetic instruction. If a simplification is possible, stores the simplified result of the operation in OperationResult and result of the overflow check in OverflowResult, and return true. If no simplification is possible, returns false.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:225
Parameters
- Instruction::BinaryOps BinaryOp
- bool IsSigned
- llvm::Value* LHS
- llvm::Value* RHS
- llvm::Instruction& CtxI
- llvm::Value*& OperationResult
- llvm::Constant*& OverflowResult
¶llvm::Value* OptimizePointerDifference(
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Type* Ty,
bool isNUW)
llvm::Value* OptimizePointerDifference(
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Type* Ty,
bool isNUW)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:91
Parameters
- llvm::Value* LHS
- llvm::Value* RHS
- llvm::Type* Ty
- bool isNUW
¶void PHIArgMergedDebugLoc(llvm::Instruction* Inst,
llvm::PHINode& PN)
void PHIArgMergedDebugLoc(llvm::Instruction* Inst,
llvm::PHINode& PN)
Description
Helper function for FoldPHIArgXIntoPHI() to set debug location for the folded operation.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:654
Parameters
- llvm::Instruction* Inst
- llvm::PHINode& PN
¶llvm::Instruction* PromoteCastOfAllocation(
llvm::BitCastInst& CI,
llvm::AllocaInst& AI)
llvm::Instruction* PromoteCastOfAllocation(
llvm::BitCastInst& CI,
llvm::AllocaInst& AI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:745
Parameters
¶llvm::Value* SimplifyAddWithRemainder(
llvm::BinaryOperator& I)
llvm::Value* SimplifyAddWithRemainder(
llvm::BinaryOperator& I)
Description
Tries to simplify add operations using the definition of remainder. The definition of remainder is X % C = X - (X / C ) * C. The add expression X % C0 + (( X / C0 ) % C1) * C0 can be simplified to X % (C0 * C1)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:553
Parameters
¶llvm::Instruction* SimplifyAnyMemSet(
llvm::AnyMemSetInst* MI)
llvm::Instruction* SimplifyAnyMemSet(
llvm::AnyMemSetInst* MI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:755
Parameters
¶llvm::Instruction* SimplifyAnyMemTransfer(
llvm::AnyMemTransferInst* MI)
llvm::Instruction* SimplifyAnyMemTransfer(
llvm::AnyMemTransferInst* MI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:754
Parameters
¶bool SimplifyAssociativeOrCommutative(
llvm::BinaryOperator& I)
bool SimplifyAssociativeOrCommutative(
llvm::BinaryOperator& I)
Description
Performs a few simplifications for operators which are associative or commutative.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:537
Parameters
¶bool SimplifyDemandedBits(
llvm::Instruction* I,
unsigned int Op,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth = 0)
bool SimplifyDemandedBits(
llvm::Instruction* I,
unsigned int Op,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth = 0)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:578
Parameters
- llvm::Instruction* I
- unsigned int Op
- const llvm::APInt& DemandedMask
- llvm::KnownBits& Known
- unsigned int Depth = 0
¶bool SimplifyDemandedInstructionBits(
llvm::Instruction& Inst)
bool SimplifyDemandedInstructionBits(
llvm::Instruction& Inst)
Description
Tries to simplify operands to an integer instruction based on its demanded bits.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:598
Parameters
- llvm::Instruction& Inst
¶llvm::Value* SimplifyDemandedUseBits(
llvm::Value* V,
llvm::APInt DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth,
llvm::Instruction* CxtI)
llvm::Value* SimplifyDemandedUseBits(
llvm::Value* V,
llvm::APInt DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth,
llvm::Instruction* CxtI)
Description
Attempts to replace V with a simpler value based on the demanded bits.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:576
Parameters
- llvm::Value* V
- llvm::APInt DemandedMask
- llvm::KnownBits& Known
- unsigned int Depth
- llvm::Instruction* CxtI
¶llvm::Value* SimplifyDemandedVectorElts(
llvm::Value* V,
llvm::APInt DemandedElts,
llvm::APInt& UndefElts,
unsigned int Depth = 0,
bool AllowMultipleUsers = false)
llvm::Value* SimplifyDemandedVectorElts(
llvm::Value* V,
llvm::APInt DemandedElts,
llvm::APInt& UndefElts,
unsigned int Depth = 0,
bool AllowMultipleUsers = false)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:600
Parameters
- llvm::Value* V
- llvm::APInt DemandedElts
- llvm::APInt& UndefElts
- unsigned int Depth = 0
- bool AllowMultipleUsers = false
¶llvm::Value* SimplifyMultipleUseDemandedBits(
llvm::Instruction* I,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth,
llvm::Instruction* CxtI)
llvm::Value* SimplifyMultipleUseDemandedBits(
llvm::Instruction* I,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known,
unsigned int Depth,
llvm::Instruction* CxtI)
Description
Helper routine of SimplifyDemandedUseBits. It computes KnownZero/KnownOne bits. It also tries to handle simplifications that can be done based on DemandedMask, but without modifying the Instruction.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:585
Parameters
- llvm::Instruction* I
- const llvm::APInt& DemandedMask
- llvm::KnownBits& Known
- unsigned int Depth
- llvm::Instruction* CxtI
¶llvm::Value* SimplifySelectsFeedingBinaryOp(
llvm::BinaryOperator& I,
llvm::Value* LHS,
llvm::Value* RHS)
llvm::Value* SimplifySelectsFeedingBinaryOp(
llvm::BinaryOperator& I,
llvm::Value* LHS,
llvm::Value* RHS)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:557
Parameters
- llvm::BinaryOperator& I
- llvm::Value* LHS
- llvm::Value* RHS
¶llvm::Value* SimplifyUsingDistributiveLaws(
llvm::BinaryOperator& I)
llvm::Value* SimplifyUsingDistributiveLaws(
llvm::BinaryOperator& I)
Description
Tries to simplify binary operations which some other binary operation distributes over. It does this by either by factorizing out common terms (eg "(A*B)+(A*C)" -> "A*(B+C)") or expanding out if this results in simplifications (eg: "A & (B | C) -> (A &B ) | (A &C )" if this is a win). Returns the simplified value, or null if it didn't simplify.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:546
Parameters
¶llvm::Instruction* SliceUpIllegalIntegerPHI(
llvm::PHINode& PN)
llvm::Instruction* SliceUpIllegalIntegerPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:148
Parameters
- llvm::PHINode& PN
¶bool annotateAnyAllocSite(
llvm::CallBase& Call,
const llvm::TargetLibraryInfo* TLI)
bool annotateAnyAllocSite(
llvm::CallBase& Call,
const llvm::TargetLibraryInfo* TLI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:196
Parameters
- llvm::CallBase& Call
- const llvm::TargetLibraryInfo* TLI
¶llvm::Instruction*
canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(
llvm::BinaryOperator& I)
llvm::Instruction*
canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:115
Parameters
¶llvm::CmpInst* canonicalizeICmpPredicate(
llvm::CmpInst& I)
llvm::CmpInst* canonicalizeICmpPredicate(
llvm::CmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:123
Parameters
¶llvm::LoadInst* combineLoadToNewType(
llvm::LoadInst& LI,
llvm::Type* NewTy,
const llvm::Twine& Suffix = "")
llvm::LoadInst* combineLoadToNewType(
llvm::LoadInst& LI,
llvm::Type* NewTy,
const llvm::Twine& Suffix = "")
Description
Helper to combine a load to a new type. This just does the work of combining a load to a new type. It handles metadata, etc., and returns the new instruction. The \c NewTy should be the loaded *value* type. This will convert it to a pointer, cast the operand to that pointer type, load it, etc. Note that this will create all of the instructions with whatever insert point the \c InstCombinerImpl currently is using.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:192
Parameters
- llvm::LoadInst& LI
- llvm::Type* NewTy
- const llvm::Twine& Suffix = ""
¶llvm::Instruction* commonCastTransforms(
llvm::CastInst& CI)
llvm::Instruction* commonCastTransforms(
llvm::CastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:127
Parameters
- llvm::CastInst& CI
¶llvm::Instruction* commonIDivTransforms(
llvm::BinaryOperator& I)
llvm::Instruction* commonIDivTransforms(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:102
Parameters
¶llvm::Instruction* commonIRemTransforms(
llvm::BinaryOperator& I)
llvm::Instruction* commonIRemTransforms(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:101
Parameters
¶llvm::Instruction* commonPointerCastTransforms(
llvm::CastInst& CI)
llvm::Instruction* commonPointerCastTransforms(
llvm::CastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:128
Parameters
- llvm::CastInst& CI
¶llvm::Instruction* commonShiftTransforms(
llvm::BinaryOperator& I)
llvm::Instruction* commonShiftTransforms(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:121
Parameters
¶llvm::KnownBits computeKnownBits(
const llvm::Value* V,
unsigned int Depth,
const llvm::Instruction* CxtI) const
llvm::KnownBits computeKnownBits(
const llvm::Value* V,
unsigned int Depth,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:475
Parameters
- const llvm::Value* V
- unsigned int Depth
- const llvm::Instruction* CxtI
¶void computeKnownBits(
const llvm::Value* V,
llvm::KnownBits& Known,
unsigned int Depth,
const llvm::Instruction* CxtI) const
void computeKnownBits(
const llvm::Value* V,
llvm::KnownBits& Known,
unsigned int Depth,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:470
Parameters
- const llvm::Value* V
- llvm::KnownBits& Known
- unsigned int Depth
- const llvm::Instruction* CxtI
¶llvm::OverflowResult computeOverflow(
Instruction::BinaryOps BinaryOp,
bool IsSigned,
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Instruction* CxtI) const
llvm::OverflowResult computeOverflow(
Instruction::BinaryOps BinaryOp,
bool IsSigned,
llvm::Value* LHS,
llvm::Value* RHS,
llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:531
Parameters
- Instruction::BinaryOps BinaryOp
- bool IsSigned
- llvm::Value* LHS
- llvm::Value* RHS
- llvm::Instruction* CxtI
¶llvm::OverflowResult computeOverflowForSignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult computeOverflowForSignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:514
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶llvm::OverflowResult computeOverflowForSignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult computeOverflowForSignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:502
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶llvm::OverflowResult computeOverflowForSignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult computeOverflowForSignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:526
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶llvm::OverflowResult
computeOverflowForUnsignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult
computeOverflowForUnsignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:508
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶llvm::OverflowResult
computeOverflowForUnsignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult
computeOverflowForUnsignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:496
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶llvm::OverflowResult
computeOverflowForUnsignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
llvm::OverflowResult
computeOverflowForUnsignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction* CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:520
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction* CxtI
¶bool dominatesAllUses(
const llvm::Instruction* DI,
const llvm::Instruction* UI,
const llvm::BasicBlock* DB) const
bool dominatesAllUses(
const llvm::Instruction* DI,
const llvm::Instruction* UI,
const llvm::BasicBlock* DB) const
Description
True when DB dominates all uses of DI except UI. UI must be in the same block as DI. The routine checks that the DI parent and DB are different.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:185
Parameters
- const llvm::Instruction* DI
- const llvm::Instruction* UI
- const llvm::BasicBlock* DB
¶llvm::Value* dyn_castNegVal(llvm::Value* V) const
llvm::Value* dyn_castNegVal(llvm::Value* V) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:200
Parameters
- llvm::Value* V
¶llvm::Instruction* eraseInstFromFunction(
llvm::Instruction& I)
llvm::Instruction* eraseInstFromFunction(
llvm::Instruction& I)
Description
Combiner aware instruction erasure. When dealing with an instruction that has side effects or produces a void value, we can't rely on DCE to delete the instruction. Instead, visit methods should return the value returned by this function.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:453
Parameters
¶llvm::Instruction* foldAddWithConstant(
llvm::BinaryOperator& Add)
llvm::Instruction* foldAddWithConstant(
llvm::BinaryOperator& Add)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:634
Parameters
- llvm::BinaryOperator& Add
¶llvm::Instruction*
foldAggregateConstructionIntoAggregateReuse(
llvm::InsertValueInst& OrigIVI)
llvm::Instruction*
foldAggregateConstructionIntoAggregateReuse(
llvm::InsertValueInst& OrigIVI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:166
Parameters
- llvm::InsertValueInst& OrigIVI
¶llvm::Instruction* foldAllocaCmp(
llvm::ICmpInst& ICI,
const llvm::AllocaInst* Alloca)
llvm::Instruction* foldAllocaCmp(
llvm::ICmpInst& ICI,
const llvm::AllocaInst* Alloca)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:660
Parameters
- llvm::ICmpInst& ICI
- const llvm::AllocaInst* Alloca
¶llvm::Value* foldAndOrOfICmps(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::Instruction& I,
bool IsAnd,
bool IsLogical = false)
llvm::Value* foldAndOrOfICmps(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::Instruction& I,
bool IsAnd,
bool IsLogical = false)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:348
Parameters
- llvm::ICmpInst* LHS
- llvm::ICmpInst* RHS
- llvm::Instruction& I
- bool IsAnd
- bool IsLogical = false
¶llvm::Value* foldAndOrOfICmpsOfAndWithPow2(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::Instruction* CxtI,
bool IsAnd,
bool IsLogical = false)
llvm::Value* foldAndOrOfICmpsOfAndWithPow2(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::Instruction* CxtI,
bool IsAnd,
bool IsLogical = false)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:363
Parameters
- llvm::ICmpInst* LHS
- llvm::ICmpInst* RHS
- llvm::Instruction* CxtI
- bool IsAnd
- bool IsLogical = false
¶llvm::Value* foldAndOrOfICmpsUsingRanges(
llvm::ICmpInst* ICmp1,
llvm::ICmpInst* ICmp2,
bool IsAnd)
llvm::Value* foldAndOrOfICmpsUsingRanges(
llvm::ICmpInst* ICmp1,
llvm::ICmpInst* ICmp2,
bool IsAnd)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:354
Parameters
- llvm::ICmpInst* ICmp1
- llvm::ICmpInst* ICmp2
- bool IsAnd
¶llvm::Instruction*
foldAndOrOfSelectUsingImpliedCond(
llvm::Value* Op,
llvm::SelectInst& SI,
bool IsAnd)
llvm::Instruction*
foldAndOrOfSelectUsingImpliedCond(
llvm::Value* Op,
llvm::SelectInst& SI,
bool IsAnd)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:376
Parameters
- llvm::Value* Op
- llvm::SelectInst& SI
- bool IsAnd
¶llvm::Instruction* foldBinOpIntoSelectOrPhi(
llvm::BinaryOperator& I)
llvm::Instruction* foldBinOpIntoSelectOrPhi(
llvm::BinaryOperator& I)
Description
This is a convenience wrapper function for the above two functions.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:632
Parameters
¶llvm::Instruction* foldBinopOfSextBoolToSelect(
llvm::BinaryOperator& I)
llvm::Instruction* foldBinopOfSextBoolToSelect(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:323
Parameters
¶llvm::Instruction* foldBinopWithPhiOperands(
llvm::BinaryOperator& BO)
llvm::Instruction* foldBinopWithPhiOperands(
llvm::BinaryOperator& BO)
Description
For a binary operator with 2 phi operands, try to hoist the binary operation before the phi. This can result in fewer instructions in patterns where at least one set of phi operands simplifies. Example: BB3: binop (phi [X, BB1], [C1, BB2]), (phi [Y, BB1], [C2, BB2]) --> BB1: BO = binop X, Y BB3: phi [BO, BB1], [(binop C1, C2), BB2]
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:622
Parameters
¶llvm::Instruction* foldBitcastExtElt(
llvm::ExtractElementInst& ExtElt)
llvm::Instruction* foldBitcastExtElt(
llvm::ExtractElementInst& ExtElt)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:321
Parameters
- llvm::ExtractElementInst& ExtElt
¶llvm::Instruction* foldCastedBitwiseLogic(
llvm::BinaryOperator& I)
llvm::Instruction* foldCastedBitwiseLogic(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:322
Parameters
¶llvm::Instruction* foldCmpLoadFromIndexedGlobal(
llvm::LoadInst* LI,
llvm::GetElementPtrInst* GEP,
llvm::GlobalVariable* GV,
llvm::CmpInst& ICI,
llvm::ConstantInt* AndCst = nullptr)
llvm::Instruction* foldCmpLoadFromIndexedGlobal(
llvm::LoadInst* LI,
llvm::GetElementPtrInst* GEP,
llvm::GlobalVariable* GV,
llvm::CmpInst& ICI,
llvm::ConstantInt* AndCst = nullptr)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:661
Parameters
- llvm::LoadInst* LI
- llvm::GetElementPtrInst* GEP
- llvm::GlobalVariable* GV
- llvm::CmpInst& ICI
- llvm::ConstantInt* AndCst = nullptr
¶llvm::Value* foldEqOfParts(llvm::ICmpInst* Cmp0,
llvm::ICmpInst* Cmp1,
bool IsAnd)
llvm::Value* foldEqOfParts(llvm::ICmpInst* Cmp0,
llvm::ICmpInst* Cmp1,
bool IsAnd)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:352
Parameters
- llvm::ICmpInst* Cmp0
- llvm::ICmpInst* Cmp1
- bool IsAnd
¶llvm::Instruction* foldFCmpIntToFPConst(
llvm::FCmpInst& I,
llvm::Instruction* LHSI,
llvm::Constant* RHSC)
llvm::Instruction* foldFCmpIntToFPConst(
llvm::FCmpInst& I,
llvm::Instruction* LHSI,
llvm::Constant* RHSC)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:665
Parameters
- llvm::FCmpInst& I
- llvm::Instruction* LHSI
- llvm::Constant* RHSC
¶llvm::Instruction* foldFPSignBitOps(
llvm::BinaryOperator& I)
llvm::Instruction* foldFPSignBitOps(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:370
Parameters
¶llvm::Instruction* foldFreezeIntoRecurrence(
llvm::FreezeInst& I,
llvm::PHINode* PN)
llvm::Instruction* foldFreezeIntoRecurrence(
llvm::FreezeInst& I,
llvm::PHINode* PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:176
Parameters
¶llvm::Instruction* foldGEPICmp(
llvm::GEPOperator* GEPLHS,
llvm::Value* RHS,
ICmpInst::Predicate Cond,
llvm::Instruction& I)
llvm::Instruction* foldGEPICmp(
llvm::GEPOperator* GEPLHS,
llvm::Value* RHS,
ICmpInst::Predicate Cond,
llvm::Instruction& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:656
Parameters
- llvm::GEPOperator* GEPLHS
- llvm::Value* RHS
- ICmpInst::Predicate Cond
- llvm::Instruction& I
¶llvm::Instruction* foldICmpAddConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Add,
const llvm::APInt& C)
llvm::Instruction* foldICmpAddConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Add,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:713
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Add
- const llvm::APInt& C
¶llvm::Instruction* foldICmpAddOpConst(
llvm::Value* X,
const llvm::APInt& C,
ICmpInst::Predicate Pred)
llvm::Instruction* foldICmpAddOpConst(
llvm::Value* X,
const llvm::APInt& C,
ICmpInst::Predicate Pred)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:667
Parameters
- llvm::Value* X
- const llvm::APInt& C
- ICmpInst::Predicate Pred
¶llvm::Instruction* foldICmpAndConstConst(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C1)
llvm::Instruction* foldICmpAndConstConst(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C1)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:715
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* And
- const llvm::APInt& C1
¶llvm::Instruction* foldICmpAndConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C)
llvm::Instruction* foldICmpAndConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:693
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* And
- const llvm::APInt& C
¶llvm::Instruction* foldICmpAndShift(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C1,
const llvm::APInt& C2)
llvm::Instruction* foldICmpAndShift(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* And,
const llvm::APInt& C1,
const llvm::APInt& C2)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:717
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* And
- const llvm::APInt& C1
- const llvm::APInt& C2
¶llvm::Instruction* foldICmpBinOp(
llvm::ICmpInst& Cmp,
const llvm::SimplifyQuery& SQ)
llvm::Instruction* foldICmpBinOp(
llvm::ICmpInst& Cmp,
const llvm::SimplifyQuery& SQ)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:679
Parameters
- llvm::ICmpInst& Cmp
- const llvm::SimplifyQuery& SQ
¶llvm::Instruction*
foldICmpBinOpEqualityWithConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* BO,
const llvm::APInt& C)
llvm::Instruction*
foldICmpBinOpEqualityWithConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* BO,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:724
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* BO
- const llvm::APInt& C
¶llvm::Instruction* foldICmpBinOpWithConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* BO,
const llvm::APInt& C)
llvm::Instruction* foldICmpBinOpWithConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* BO,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:687
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* BO
- const llvm::APInt& C
¶llvm::Instruction* foldICmpBitCast(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpBitCast(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:731
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpDivConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Div,
const llvm::APInt& C)
llvm::Instruction* foldICmpDivConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Div,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:709
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Div
- const llvm::APInt& C
¶llvm::Instruction*
foldICmpEqIntrinsicWithConstant(
llvm::ICmpInst& ICI,
llvm::IntrinsicInst* II,
const llvm::APInt& C)
llvm::Instruction*
foldICmpEqIntrinsicWithConstant(
llvm::ICmpInst& ICI,
llvm::IntrinsicInst* II,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:729
Parameters
- llvm::ICmpInst& ICI
- llvm::IntrinsicInst* II
- const llvm::APInt& C
¶llvm::Instruction* foldICmpEquality(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpEquality(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:680
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpInstWithConstant(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpInstWithConstant(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:675
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction*
foldICmpInstWithConstantAllowUndef(
llvm::ICmpInst& Cmp,
const llvm::APInt& C)
llvm::Instruction*
foldICmpInstWithConstantAllowUndef(
llvm::ICmpInst& Cmp,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:677
Parameters
- llvm::ICmpInst& Cmp
- const llvm::APInt& C
¶llvm::Instruction* foldICmpInstWithConstantNotInt(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpInstWithConstantNotInt(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:676
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpIntrinsicWithConstant(
llvm::ICmpInst& ICI,
llvm::IntrinsicInst* II,
const llvm::APInt& C)
llvm::Instruction* foldICmpIntrinsicWithConstant(
llvm::ICmpInst& ICI,
llvm::IntrinsicInst* II,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:727
Parameters
- llvm::ICmpInst& ICI
- llvm::IntrinsicInst* II
- const llvm::APInt& C
¶llvm::Instruction* foldICmpMulConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Mul,
const llvm::APInt& C)
llvm::Instruction* foldICmpMulConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Mul,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:699
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Mul
- const llvm::APInt& C
¶llvm::Instruction* foldICmpOrConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Or,
const llvm::APInt& C)
llvm::Instruction* foldICmpOrConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Or,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:697
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Or
- const llvm::APInt& C
¶llvm::Instruction* foldICmpSRemConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* UDiv,
const llvm::APInt& C)
llvm::Instruction* foldICmpSRemConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* UDiv,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:705
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* UDiv
- const llvm::APInt& C
¶llvm::Instruction* foldICmpSelectConstant(
llvm::ICmpInst& Cmp,
llvm::SelectInst* Select,
llvm::ConstantInt* C)
llvm::Instruction* foldICmpSelectConstant(
llvm::ICmpInst& Cmp,
llvm::SelectInst* Select,
llvm::ConstantInt* C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:689
Parameters
- llvm::ICmpInst& Cmp
- llvm::SelectInst* Select
- llvm::ConstantInt* C
¶llvm::Instruction* foldICmpShlConstConst(
llvm::ICmpInst& I,
llvm::Value* ShAmt,
const llvm::APInt& C1,
const llvm::APInt& C2)
llvm::Instruction* foldICmpShlConstConst(
llvm::ICmpInst& I,
llvm::Value* ShAmt,
const llvm::APInt& C1,
const llvm::APInt& C2)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:721
Parameters
- llvm::ICmpInst& I
- llvm::Value* ShAmt
- const llvm::APInt& C1
- const llvm::APInt& C2
¶llvm::Instruction* foldICmpShlConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Shl,
const llvm::APInt& C)
llvm::Instruction* foldICmpShlConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Shl,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:701
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Shl
- const llvm::APInt& C
¶llvm::Instruction* foldICmpShrConstConst(
llvm::ICmpInst& I,
llvm::Value* ShAmt,
const llvm::APInt& C1,
const llvm::APInt& C2)
llvm::Instruction* foldICmpShrConstConst(
llvm::ICmpInst& I,
llvm::Value* ShAmt,
const llvm::APInt& C1,
const llvm::APInt& C2)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:719
Parameters
- llvm::ICmpInst& I
- llvm::Value* ShAmt
- const llvm::APInt& C1
- const llvm::APInt& C2
¶llvm::Instruction* foldICmpShrConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Shr,
const llvm::APInt& C)
llvm::Instruction* foldICmpShrConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Shr,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:703
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Shr
- const llvm::APInt& C
¶llvm::Instruction* foldICmpSubConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Sub,
const llvm::APInt& C)
llvm::Instruction* foldICmpSubConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Sub,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:711
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Sub
- const llvm::APInt& C
¶llvm::Instruction* foldICmpTruncConstant(
llvm::ICmpInst& Cmp,
llvm::TruncInst* Trunc,
const llvm::APInt& C)
llvm::Instruction* foldICmpTruncConstant(
llvm::ICmpInst& Cmp,
llvm::TruncInst* Trunc,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:691
Parameters
- llvm::ICmpInst& Cmp
- llvm::TruncInst* Trunc
- const llvm::APInt& C
¶llvm::Instruction* foldICmpUDivConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* UDiv,
const llvm::APInt& C)
llvm::Instruction* foldICmpUDivConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* UDiv,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:707
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* UDiv
- const llvm::APInt& C
¶llvm::Instruction* foldICmpUsingKnownBits(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpUsingKnownBits(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:672
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpWithCastOp(
llvm::ICmpInst& ICmp)
llvm::Instruction* foldICmpWithCastOp(
llvm::ICmpInst& ICmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:669
Parameters
- llvm::ICmpInst& ICmp
¶llvm::Instruction* foldICmpWithConstant(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpWithConstant(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:674
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpWithDominatingICmp(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpWithDominatingICmp(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:673
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpWithZero(
llvm::ICmpInst& Cmp)
llvm::Instruction* foldICmpWithZero(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:683
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldICmpWithZextOrSext(
llvm::ICmpInst& ICmp)
llvm::Instruction* foldICmpWithZextOrSext(
llvm::ICmpInst& ICmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:670
Parameters
- llvm::ICmpInst& ICmp
¶llvm::Instruction* foldICmpXorConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Xor,
const llvm::APInt& C)
llvm::Instruction* foldICmpXorConstant(
llvm::ICmpInst& Cmp,
llvm::BinaryOperator* Xor,
const llvm::APInt& C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:695
Parameters
- llvm::ICmpInst& Cmp
- llvm::BinaryOperator* Xor
- const llvm::APInt& C
¶llvm::Instruction* foldIRemByPowerOfTwoToBitTest(
llvm::ICmpInst& I)
llvm::Instruction* foldIRemByPowerOfTwoToBitTest(
llvm::ICmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:681
Parameters
¶llvm::Instruction* foldIntegerTypedPHI(
llvm::PHINode& PN)
llvm::Instruction* foldIntegerTypedPHI(
llvm::PHINode& PN)
Description
If an integer typed PHI has only one use which is an IntToPtr operation, replace the PHI with an existing pointer typed PHI if it exists. Otherwise insert a new pointer typed PHI and replace the original one.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:650
Parameters
- llvm::PHINode& PN
¶llvm::Instruction*
foldIntrinsicWithOverflowCommon(
llvm::IntrinsicInst* II)
llvm::Instruction*
foldIntrinsicWithOverflowCommon(
llvm::IntrinsicInst* II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:369
Parameters
¶llvm::Instruction* foldItoFPtoI(
llvm::CastInst& FI)
llvm::Instruction* foldItoFPtoI(
llvm::CastInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:142
Parameters
- llvm::CastInst& FI
¶llvm::Value* foldLogicOfFCmps(
llvm::FCmpInst* LHS,
llvm::FCmpInst* RHS,
bool IsAnd,
bool IsLogicalSelect = false)
llvm::Value* foldLogicOfFCmps(
llvm::FCmpInst* LHS,
llvm::FCmpInst* RHS,
bool IsAnd,
bool IsLogicalSelect = false)
Description
Optimize (fcmp) & (fcmp) or (fcmp)|(fcmp). NOTE: Unlike most of instcombine, this returns a Value which should already be inserted into the function.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:360
Parameters
- llvm::FCmpInst* LHS
- llvm::FCmpInst* RHS
- bool IsAnd
- bool IsLogicalSelect = false
¶llvm::Value* foldMultiplicationOverflowCheck(
llvm::ICmpInst& Cmp)
llvm::Value* foldMultiplicationOverflowCheck(
llvm::ICmpInst& Cmp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:685
Parameters
- llvm::ICmpInst& Cmp
¶llvm::Instruction* foldNot(
llvm::BinaryOperator& I)
llvm::Instruction* foldNot(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:330
Parameters
¶llvm::Instruction* foldOpIntoPhi(
llvm::Instruction& I,
llvm::PHINode* PN)
llvm::Instruction* foldOpIntoPhi(
llvm::Instruction& I,
llvm::PHINode* PN)
Description
Given a binary operator, cast instruction, or select which has a PHI node as operand #0, see if we can fold the instruction into the PHI (which is only possible if all operands to the PHI are constants).
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:612
Parameters
¶llvm::Instruction* foldPHIArgBinOpIntoPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgBinOpIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:639
Parameters
- llvm::PHINode& PN
¶llvm::Instruction*
foldPHIArgExtractValueInstructionIntoPHI(
llvm::PHINode& PN)
llvm::Instruction*
foldPHIArgExtractValueInstructionIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:641
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldPHIArgGEPIntoPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgGEPIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:642
Parameters
- llvm::PHINode& PN
¶llvm::Instruction*
foldPHIArgInsertValueInstructionIntoPHI(
llvm::PHINode& PN)
llvm::Instruction*
foldPHIArgInsertValueInstructionIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:640
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldPHIArgIntToPtrToPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgIntToPtrToPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:645
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldPHIArgLoadIntoPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgLoadIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:643
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldPHIArgOpIntoPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgOpIntoPHI(
llvm::PHINode& PN)
Description
Try to rotate an operation below a PHI node, using PHI nodes for its operands.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:638
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldPHIArgZextsIntoPHI(
llvm::PHINode& PN)
llvm::Instruction* foldPHIArgZextsIntoPHI(
llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:644
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* foldSPFofSPF(
llvm::Instruction* Inner,
llvm::SelectPatternFlavor SPF1,
llvm::Value* A,
llvm::Value* B,
llvm::Instruction& Outer,
llvm::SelectPatternFlavor SPF2,
llvm::Value* C)
llvm::Instruction* foldSPFofSPF(
llvm::Instruction* Inner,
llvm::SelectPatternFlavor SPF1,
llvm::Value* A,
llvm::Value* B,
llvm::Instruction& Outer,
llvm::SelectPatternFlavor SPF2,
llvm::Value* C)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:737
Parameters
- llvm::Instruction* Inner
- llvm::SelectPatternFlavor SPF1
- llvm::Value* A
- llvm::Value* B
- llvm::Instruction& Outer
- llvm::SelectPatternFlavor SPF2
- llvm::Value* C
¶llvm::Instruction* foldSelectExtConst(
llvm::SelectInst& Sel)
llvm::Instruction* foldSelectExtConst(
llvm::SelectInst& Sel)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:734
Parameters
- llvm::SelectInst& Sel
¶llvm::Instruction* foldSelectICmp(
ICmpInst::Predicate Pred,
llvm::SelectInst* SI,
llvm::Value* RHS,
const llvm::ICmpInst& I)
llvm::Instruction* foldSelectICmp(
ICmpInst::Predicate Pred,
llvm::SelectInst* SI,
llvm::Value* RHS,
const llvm::ICmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:658
Parameters
- ICmpInst::Predicate Pred
- llvm::SelectInst* SI
- llvm::Value* RHS
- const llvm::ICmpInst& I
¶llvm::Instruction* foldSelectInstWithICmp(
llvm::SelectInst& SI,
llvm::ICmpInst* ICI)
llvm::Instruction* foldSelectInstWithICmp(
llvm::SelectInst& SI,
llvm::ICmpInst* ICI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:740
Parameters
- llvm::SelectInst& SI
- llvm::ICmpInst* ICI
¶llvm::Instruction* foldSelectIntoOp(
llvm::SelectInst& SI,
llvm::Value*,
llvm::Value*)
llvm::Instruction* foldSelectIntoOp(
llvm::SelectInst& SI,
llvm::Value*,
llvm::Value*)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:736
Parameters
¶llvm::Instruction* foldSelectOpOp(
llvm::SelectInst& SI,
llvm::Instruction* TI,
llvm::Instruction* FI)
llvm::Instruction* foldSelectOpOp(
llvm::SelectInst& SI,
llvm::Instruction* TI,
llvm::Instruction* FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:735
Parameters
¶llvm::Instruction* foldSelectShuffle(
llvm::ShuffleVectorInst& Shuf)
llvm::Instruction* foldSelectShuffle(
llvm::ShuffleVectorInst& Shuf)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:607
Parameters
- llvm::ShuffleVectorInst& Shuf
¶llvm::Instruction* foldSelectValueEquivalence(
llvm::SelectInst& SI,
llvm::ICmpInst& ICI)
llvm::Instruction* foldSelectValueEquivalence(
llvm::SelectInst& SI,
llvm::ICmpInst& ICI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:741
Parameters
- llvm::SelectInst& SI
- llvm::ICmpInst& ICI
¶llvm::Instruction* foldSignBitTest(
llvm::ICmpInst& I)
llvm::Instruction* foldSignBitTest(
llvm::ICmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:682
Parameters
¶llvm::Instruction*
foldVariableSignZeroExtensionOfVariableHighBitExtract(
llvm::BinaryOperator& OldAShr)
llvm::Instruction*
foldVariableSignZeroExtensionOfVariableHighBitExtract(
llvm::BinaryOperator& OldAShr)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:117
Parameters
- llvm::BinaryOperator& OldAShr
¶llvm::Instruction* foldVectorBinop(
llvm::BinaryOperator& Inst)
llvm::Instruction* foldVectorBinop(
llvm::BinaryOperator& Inst)
Description
Canonicalize the position of binops relative to shufflevector.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:605
Parameters
- llvm::BinaryOperator& Inst
¶llvm::Instruction* foldVectorSelect(
llvm::SelectInst& Sel)
llvm::Instruction* foldVectorSelect(
llvm::SelectInst& Sel)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:606
Parameters
- llvm::SelectInst& Sel
¶llvm::Value* foldXorOfICmps(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::BinaryOperator& Xor)
llvm::Value* foldXorOfICmps(
llvm::ICmpInst* LHS,
llvm::ICmpInst* RHS,
llvm::BinaryOperator& Xor)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:350
Parameters
- llvm::ICmpInst* LHS
- llvm::ICmpInst* RHS
- llvm::BinaryOperator& Xor
¶void freelyInvertAllUsersOf(llvm::Value* V)
void freelyInvertAllUsersOf(llvm::Value* V)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:332
Parameters
- llvm::Value* V
¶bool freezeOtherUses(llvm::FreezeInst& FI)
bool freezeOtherUses(llvm::FreezeInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:175
Parameters
- llvm::FreezeInst& FI
¶llvm::Value* getSelectCondition(llvm::Value* A,
llvm::Value* B)
llvm::Value* getSelectCondition(llvm::Value* A,
llvm::Value* B)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:367
Parameters
- llvm::Value* A
- llvm::Value* B
¶llvm::Value* insertRangeTest(
llvm::Value* V,
const llvm::APInt& Lo,
const llvm::APInt& Hi,
bool isSigned,
bool Inside)
llvm::Value* insertRangeTest(
llvm::Value* V,
const llvm::APInt& Lo,
const llvm::APInt& Hi,
bool isSigned,
bool Inside)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:743
Parameters
- llvm::Value* V
- const llvm::APInt& Lo
- const llvm::APInt& Hi
- bool isSigned
- bool Inside
¶bool isDesirableIntType(
unsigned int BitWidth) const
bool isDesirableIntType(
unsigned int BitWidth) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:197
Parameters
- unsigned int BitWidth
¶Instruction::CastOps isEliminableCastPair(
const llvm::CastInst* CI1,
const llvm::CastInst* CI2)
Instruction::CastOps isEliminableCastPair(
const llvm::CastInst* CI1,
const llvm::CastInst* CI2)
Description
Determine if a pair of casts can be replaced by a single cast.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:344
Parameters
- const llvm::CastInst* CI1
- The first of a pair of casts.
- const llvm::CastInst* CI2
- The second of a pair of casts.
Returns
0 if the cast pair cannot be eliminated, otherwise returns an Instruction::CastOps value for a cast that can replace the pair, casting CI1->getSrcTy() to CI2->getDstTy().
¶bool isKnownToBeAPowerOfTwo(
const llvm::Value* V,
bool OrZero = false,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr)
bool isKnownToBeAPowerOfTwo(
const llvm::Value* V,
bool OrZero = false,
unsigned int Depth = 0,
const llvm::Instruction* CxtI = nullptr)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:480
Parameters
- const llvm::Value* V
- bool OrZero = false
- unsigned int Depth = 0
- const llvm::Instruction* CxtI = nullptr
¶llvm::Instruction* matchBSwapOrBitReverse(
llvm::Instruction& I,
bool MatchBSwaps,
bool MatchBitReversals)
llvm::Instruction* matchBSwapOrBitReverse(
llvm::Instruction& I,
bool MatchBSwaps,
bool MatchBitReversals)
Description
Given an initial instruction, check to see if it is the root of a bswap/bitreverse idiom. If so, return the equivalent bswap/bitreverse intrinsic.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:751
Parameters
- llvm::Instruction& I
- bool MatchBSwaps
- bool MatchBitReversals
¶llvm::Instruction* matchSAddSubSat(
llvm::IntrinsicInst& MinMax1)
llvm::Instruction* matchSAddSubSat(
llvm::IntrinsicInst& MinMax1)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:329
Parameters
- llvm::IntrinsicInst& MinMax1
¶llvm::Value* matchSelectFromAndOr(llvm::Value* A,
llvm::Value* B,
llvm::Value* C,
llvm::Value* D)
llvm::Value* matchSelectFromAndOr(llvm::Value* A,
llvm::Value* B,
llvm::Value* C,
llvm::Value* D)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:366
Parameters
- llvm::Value* A
- llvm::Value* B
- llvm::Value* C
- llvm::Value* D
¶bool matchThreeWayIntCompare(
llvm::SelectInst* SI,
llvm::Value*& LHS,
llvm::Value*& RHS,
llvm::ConstantInt*& Less,
llvm::ConstantInt*& Equal,
llvm::ConstantInt*& Greater)
bool matchThreeWayIntCompare(
llvm::SelectInst* SI,
llvm::Value*& LHS,
llvm::Value*& RHS,
llvm::ConstantInt*& Less,
llvm::ConstantInt*& Equal,
llvm::ConstantInt*& Greater)
Description
Match a select chain which produces one of three values based on whether the LHS is less than, equal to, or greater than RHS respectively. Return true if we matched a three way compare idiom. The LHS, RHS, Less, Equal and Greater values are saved in the matching process and returned to the caller.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:570
Parameters
- llvm::SelectInst* SI
- llvm::Value*& LHS
- llvm::Value*& RHS
- llvm::ConstantInt*& Less
- llvm::ConstantInt*& Equal
- llvm::ConstantInt*& Greater
¶bool mergeStoreIntoSuccessor(llvm::StoreInst& SI)
bool mergeStoreIntoSuccessor(llvm::StoreInst& SI)
Description
Try to transform: if () { *P = v1; } else { *P = v2 } or: *P = v1; if () { *P = v2; } into a phi node with a store in the successor.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:746
Parameters
- llvm::StoreInst& SI
¶llvm::Instruction* narrowBinOp(
llvm::TruncInst& Trunc)
llvm::Instruction* narrowBinOp(
llvm::TruncInst& Trunc)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:324
Parameters
- llvm::TruncInst& Trunc
¶llvm::Instruction* narrowFunnelShift(
llvm::TruncInst& Trunc)
llvm::Instruction* narrowFunnelShift(
llvm::TruncInst& Trunc)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:327
Parameters
- llvm::TruncInst& Trunc
¶llvm::Instruction* narrowMaskedBinOp(
llvm::BinaryOperator& And)
llvm::Instruction* narrowMaskedBinOp(
llvm::BinaryOperator& And)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:325
Parameters
- llvm::BinaryOperator& And
¶llvm::Instruction* narrowMathIfNoOverflow(
llvm::BinaryOperator& I)
llvm::Instruction* narrowMathIfNoOverflow(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:326
Parameters
¶llvm::Instruction* optimizeBitCastFromPhi(
llvm::CastInst& CI,
llvm::PHINode* PN)
llvm::Instruction* optimizeBitCastFromPhi(
llvm::CastInst& CI,
llvm::PHINode* PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:328
Parameters
- llvm::CastInst& CI
- llvm::PHINode* PN
¶llvm::Value*
pushFreezeToPreventPoisonFromPropagating(
llvm::FreezeInst& FI)
llvm::Value*
pushFreezeToPreventPoisonFromPropagating(
llvm::FreezeInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:174
Parameters
- llvm::FreezeInst& FI
¶llvm::Value*
reassociateShiftAmtsOfTwoSameDirectionShifts(
llvm::BinaryOperator* Sh0,
const llvm::SimplifyQuery& SQ,
bool AnalyzeForSignBitExtraction = false)
llvm::Value*
reassociateShiftAmtsOfTwoSameDirectionShifts(
llvm::BinaryOperator* Sh0,
const llvm::SimplifyQuery& SQ,
bool AnalyzeForSignBitExtraction = false)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:112
Parameters
- llvm::BinaryOperator* Sh0
- const llvm::SimplifyQuery& SQ
- bool AnalyzeForSignBitExtraction = false
¶llvm::Instruction* replaceInstUsesWith(
llvm::Instruction& I,
llvm::Value* V)
llvm::Instruction* replaceInstUsesWith(
llvm::Instruction& I,
llvm::Value* V)
Description
A combiner-aware RAUW-like routine. This method is to be used when an instruction is found to be dead, replaceable with another preexisting expression. Here we add all uses of I to the worklist, replace all uses of I with the new value, then return I, so that the inst combiner will know that I was modified.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:405
Parameters
¶llvm::Instruction* replaceOperand(
llvm::Instruction& I,
unsigned int OpNum,
llvm::Value* V)
llvm::Instruction* replaceOperand(
llvm::Instruction& I,
unsigned int OpNum,
llvm::Value* V)
Description
Replace operand of instruction and add old operand to the worklist.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:426
Parameters
- llvm::Instruction& I
- unsigned int OpNum
- llvm::Value* V
¶void replaceUse(llvm::Use& U,
llvm::Value* NewValue)
void replaceUse(llvm::Use& U,
llvm::Value* NewValue)
Description
Replace use and add the previously used value to the worklist.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:433
Parameters
- llvm::Use& U
- llvm::Value* NewValue
¶bool replacedSelectWithOperand(
llvm::SelectInst* SI,
const llvm::ICmpInst* Icmp,
const unsigned int SIOpd)
bool replacedSelectWithOperand(
llvm::SelectInst* SI,
const llvm::ICmpInst* Icmp,
const unsigned int SIOpd)
Description
Try to replace select with select operand SIOpd in SI-ICmp sequence.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:189
Parameters
- llvm::SelectInst* SI
- const llvm::ICmpInst* Icmp
- const unsigned int SIOpd
¶bool run()
bool run()
Description
Run the combiner over the entire worklist until it is empty.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:79
Returns
true if the IR is changed.
¶llvm::Instruction* scalarizePHI(
llvm::ExtractElementInst& EI,
llvm::PHINode* PN)
llvm::Instruction* scalarizePHI(
llvm::ExtractElementInst& EI,
llvm::PHINode* PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:320
Parameters
¶bool shouldChangeType(
unsigned int FromBitWidth,
unsigned int ToBitWidth) const
bool shouldChangeType(
unsigned int FromBitWidth,
unsigned int ToBitWidth) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:198
Parameters
- unsigned int FromBitWidth
- unsigned int ToBitWidth
¶bool shouldChangeType(llvm::Type* From,
llvm::Type* To) const
bool shouldChangeType(llvm::Type* From,
llvm::Type* To) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:199
Parameters
- llvm::Type* From
- llvm::Type* To
¶bool shouldOptimizeCast(llvm::CastInst* CI)
bool shouldOptimizeCast(llvm::CastInst* CI)
Description
Classify whether a cast is worth optimizing. This is a helper to decide whether the simplification of logic(cast(A), cast(B)) to cast(logic(A, B)) should be performed.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:211
Parameters
- llvm::CastInst* CI
- The cast we are interested in.
Returns
true if this cast actually results in any code being generated and if it cannot already be eliminated by some other transformation.
¶bool simplifyDivRemOfSelectWithZeroOp(
llvm::BinaryOperator& I)
bool simplifyDivRemOfSelectWithZeroOp(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:100
Parameters
¶llvm::Value* simplifyIntToPtrRoundTripCast(
llvm::Value* Val)
llvm::Value* simplifyIntToPtrRoundTripCast(
llvm::Value* Val)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:346
Parameters
- llvm::Value* Val
¶llvm::Instruction* simplifyMaskedGather(
llvm::IntrinsicInst& II)
llvm::Instruction* simplifyMaskedGather(
llvm::IntrinsicInst& II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:238
Parameters
¶llvm::Value* simplifyMaskedLoad(
llvm::IntrinsicInst& II)
llvm::Value* simplifyMaskedLoad(
llvm::IntrinsicInst& II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:236
Parameters
¶llvm::Instruction* simplifyMaskedScatter(
llvm::IntrinsicInst& II)
llvm::Instruction* simplifyMaskedScatter(
llvm::IntrinsicInst& II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:239
Parameters
¶llvm::Instruction* simplifyMaskedStore(
llvm::IntrinsicInst& II)
llvm::Instruction* simplifyMaskedStore(
llvm::IntrinsicInst& II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:237
Parameters
¶llvm::Value* simplifyRangeCheck(
llvm::ICmpInst* Cmp0,
llvm::ICmpInst* Cmp1,
bool Inverted)
llvm::Value* simplifyRangeCheck(
llvm::ICmpInst* Cmp0,
llvm::ICmpInst* Cmp1,
bool Inverted)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:106
Parameters
- llvm::ICmpInst* Cmp0
- llvm::ICmpInst* Cmp1
- bool Inverted
¶llvm::Value* simplifyShrShlDemandedBits(
llvm::Instruction* Shr,
const llvm::APInt& ShrOp1,
llvm::Instruction* Shl,
const llvm::APInt& ShlOp1,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known)
llvm::Value* simplifyShrShlDemandedBits(
llvm::Instruction* Shr,
const llvm::APInt& ShrOp1,
llvm::Instruction* Shl,
const llvm::APInt& ShlOp1,
const llvm::APInt& DemandedMask,
llvm::KnownBits& Known)
Description
Helper routine of SimplifyDemandedUseBits. It tries to simplify demanded bit for "r1 = shr x, c1; r2 = shl r1, c2" instruction sequence.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:592
Parameters
- llvm::Instruction* Shr
- const llvm::APInt& ShrOp1
- llvm::Instruction* Shl
- const llvm::APInt& ShlOp1
- const llvm::APInt& DemandedMask
- llvm::KnownBits& Known
¶bool sinkNotIntoOtherHandOfAndOrOr(
llvm::BinaryOperator& I)
bool sinkNotIntoOtherHandOfAndOrOr(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:109
Parameters
¶llvm::Instruction* transformCallThroughTrampoline(
llvm::CallBase& Call,
llvm::IntrinsicInst& Tramp)
llvm::Instruction* transformCallThroughTrampoline(
llvm::CallBase& Call,
llvm::IntrinsicInst& Tramp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:233
Parameters
- llvm::CallBase& Call
- llvm::IntrinsicInst& Tramp
¶bool transformConstExprCastCall(
llvm::CallBase& Call)
bool transformConstExprCastCall(
llvm::CallBase& Call)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:232
Parameters
- llvm::CallBase& Call
¶llvm::Instruction* transformSExtICmp(
llvm::ICmpInst* ICI,
llvm::Instruction& CI)
llvm::Instruction* transformSExtICmp(
llvm::ICmpInst* ICI,
llvm::Instruction& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:252
Parameters
- llvm::ICmpInst* ICI
- llvm::Instruction& CI
¶llvm::Instruction* transformZExtICmp(
llvm::ICmpInst* ICI,
llvm::ZExtInst& CI)
llvm::Instruction* transformZExtICmp(
llvm::ICmpInst* ICI,
llvm::ZExtInst& CI)
Description
Transform (zext icmp) to bitwise / integer operations in order to eliminate it.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:250
Parameters
- llvm::ICmpInst* ICI
- The icmp of the (zext icmp) pair we are interested in.
- llvm::ZExtInst& CI
- The zext of the (zext icmp) pair we are interested in.
Returns
null if the transformation cannot be performed. If the transformation can be performed the new instruction that replaces the (zext icmp) pair will be returned.
¶llvm::Value* tryFactorization(
llvm::BinaryOperator&,
Instruction::BinaryOps,
llvm::Value*,
llvm::Value*,
llvm::Value*,
llvm::Value*)
llvm::Value* tryFactorization(
llvm::BinaryOperator&,
Instruction::BinaryOps,
llvm::Value*,
llvm::Value*,
llvm::Value*,
llvm::Value*)
Description
This tries to simplify binary operations by factorizing out common terms (e. g. "(A*B)+(A*C)" -> "A*(B+C)").
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:562
Parameters
- llvm::BinaryOperator&
- Instruction::BinaryOps
- llvm::Value*
- llvm::Value*
- llvm::Value*
- llvm::Value*
¶llvm::Instruction* tryOptimizeCall(
llvm::CallInst* CI)
llvm::Instruction* tryOptimizeCall(
llvm::CallInst* CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:231
Parameters
- llvm::CallInst* CI
¶llvm::Instruction* visitAShr(
llvm::BinaryOperator& I)
llvm::Instruction* visitAShr(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:119
Parameters
¶llvm::Instruction* visitAdd(
llvm::BinaryOperator& I)
llvm::Instruction* visitAdd(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:89
Parameters
¶llvm::Instruction* visitAddrSpaceCast(
llvm::AddrSpaceCastInst& CI)
llvm::Instruction* visitAddrSpaceCast(
llvm::AddrSpaceCastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:141
Parameters
¶llvm::Instruction* visitAllocSite(
llvm::Instruction& FI)
llvm::Instruction* visitAllocSite(
llvm::Instruction& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:154
Parameters
¶llvm::Instruction* visitAllocaInst(
llvm::AllocaInst& AI)
llvm::Instruction* visitAllocaInst(
llvm::AllocaInst& AI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:153
Parameters
- llvm::AllocaInst& AI
¶llvm::Instruction* visitAnd(
llvm::BinaryOperator& I)
llvm::Instruction* visitAnd(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:107
Parameters
¶llvm::Instruction* visitAtomicRMWInst(
llvm::AtomicRMWInst& SI)
llvm::Instruction* visitAtomicRMWInst(
llvm::AtomicRMWInst& SI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:158
Parameters
¶llvm::Instruction* visitBitCast(
llvm::BitCastInst& CI)
llvm::Instruction* visitBitCast(
llvm::BitCastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:140
Parameters
¶llvm::Instruction* visitBranchInst(
llvm::BranchInst& BI)
llvm::Instruction* visitBranchInst(
llvm::BranchInst& BI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:160
Parameters
- llvm::BranchInst& BI
¶llvm::Instruction* visitCallBase(
llvm::CallBase& Call)
llvm::Instruction* visitCallBase(
llvm::CallBase& Call)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:230
Parameters
- llvm::CallBase& Call
¶llvm::Instruction* visitCallBrInst(
llvm::CallBrInst& CBI)
llvm::Instruction* visitCallBrInst(
llvm::CallBrInst& CBI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:146
Parameters
- llvm::CallBrInst& CBI
¶llvm::Instruction* visitCallInst(
llvm::CallInst& CI)
llvm::Instruction* visitCallInst(
llvm::CallInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:144
Parameters
- llvm::CallInst& CI
¶llvm::Instruction* visitExtractElementInst(
llvm::ExtractElementInst& EI)
llvm::Instruction* visitExtractElementInst(
llvm::ExtractElementInst& EI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:169
Parameters
¶llvm::Instruction* visitExtractValueInst(
llvm::ExtractValueInst& EV)
llvm::Instruction* visitExtractValueInst(
llvm::ExtractValueInst& EV)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:171
Parameters
¶llvm::Instruction* visitFAdd(
llvm::BinaryOperator& I)
llvm::Instruction* visitFAdd(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:90
Parameters
¶llvm::Instruction* visitFCmpInst(
llvm::FCmpInst& I)
llvm::Instruction* visitFCmpInst(
llvm::FCmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:122
Parameters
¶llvm::Instruction* visitFDiv(
llvm::BinaryOperator& I)
llvm::Instruction* visitFDiv(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:105
Parameters
¶llvm::Instruction* visitFMul(
llvm::BinaryOperator& I)
llvm::Instruction* visitFMul(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:96
Parameters
¶llvm::Instruction* visitFNeg(
llvm::UnaryOperator& I)
llvm::Instruction* visitFNeg(
llvm::UnaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:88
Parameters
¶llvm::Instruction* visitFPExt(llvm::CastInst& CI)
llvm::Instruction* visitFPExt(llvm::CastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:133
Parameters
- llvm::CastInst& CI
¶llvm::Instruction* visitFPToSI(
llvm::FPToSIInst& FI)
llvm::Instruction* visitFPToSI(
llvm::FPToSIInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:135
Parameters
- llvm::FPToSIInst& FI
¶llvm::Instruction* visitFPToUI(
llvm::FPToUIInst& FI)
llvm::Instruction* visitFPToUI(
llvm::FPToUIInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:134
Parameters
- llvm::FPToUIInst& FI
¶llvm::Instruction* visitFPTrunc(
llvm::FPTruncInst& CI)
llvm::Instruction* visitFPTrunc(
llvm::FPTruncInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:132
Parameters
¶llvm::Instruction* visitFRem(
llvm::BinaryOperator& I)
llvm::Instruction* visitFRem(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:99
Parameters
¶llvm::Instruction* visitFSub(
llvm::BinaryOperator& I)
llvm::Instruction* visitFSub(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:94
Parameters
¶llvm::Instruction* visitFenceInst(
llvm::FenceInst& FI)
llvm::Instruction* visitFenceInst(
llvm::FenceInst& FI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:161
Parameters
- llvm::FenceInst& FI
¶llvm::Instruction* visitFree(llvm::CallInst& FI,
llvm::Value* FreedOp)
llvm::Instruction* visitFree(llvm::CallInst& FI,
llvm::Value* FreedOp)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:155
Parameters
- llvm::CallInst& FI
- llvm::Value* FreedOp
¶llvm::Instruction* visitFreeze(
llvm::FreezeInst& I)
llvm::Instruction* visitFreeze(
llvm::FreezeInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:177
Parameters
¶llvm::Instruction* visitGEPOfBitcast(
llvm::BitCastInst* BCI,
llvm::GetElementPtrInst& GEP)
llvm::Instruction* visitGEPOfBitcast(
llvm::BitCastInst* BCI,
llvm::GetElementPtrInst& GEP)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:152
Parameters
- llvm::BitCastInst* BCI
- llvm::GetElementPtrInst& GEP
¶llvm::Instruction* visitGEPOfGEP(
llvm::GetElementPtrInst& GEP,
llvm::GEPOperator* Src)
llvm::Instruction* visitGEPOfGEP(
llvm::GetElementPtrInst& GEP,
llvm::GEPOperator* Src)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:151
Parameters
- llvm::GetElementPtrInst& GEP
- llvm::GEPOperator* Src
¶llvm::Instruction* visitGetElementPtrInst(
llvm::GetElementPtrInst& GEP)
llvm::Instruction* visitGetElementPtrInst(
llvm::GetElementPtrInst& GEP)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:150
Parameters
¶llvm::Instruction* visitICmpInst(
llvm::ICmpInst& I)
llvm::Instruction* visitICmpInst(
llvm::ICmpInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:124
Parameters
¶llvm::Instruction* visitInsertElementInst(
llvm::InsertElementInst& IE)
llvm::Instruction* visitInsertElementInst(
llvm::InsertElementInst& IE)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:168
Parameters
¶llvm::Instruction* visitInsertValueInst(
llvm::InsertValueInst& IV)
llvm::Instruction* visitInsertValueInst(
llvm::InsertValueInst& IV)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:167
Parameters
¶llvm::Instruction* visitInstruction(
llvm::Instruction& I)
llvm::Instruction* visitInstruction(
llvm::Instruction& I)
Description
Specify what to return for unhandled instructions.
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:180
Parameters
¶llvm::Instruction* visitIntToPtr(
llvm::IntToPtrInst& CI)
llvm::Instruction* visitIntToPtr(
llvm::IntToPtrInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:139
Parameters
¶llvm::Instruction* visitInvokeInst(
llvm::InvokeInst& II)
llvm::Instruction* visitInvokeInst(
llvm::InvokeInst& II)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:145
Parameters
- llvm::InvokeInst& II
¶llvm::Instruction* visitLShr(
llvm::BinaryOperator& I)
llvm::Instruction* visitLShr(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:120
Parameters
¶llvm::Instruction* visitLandingPadInst(
llvm::LandingPadInst& LI)
llvm::Instruction* visitLandingPadInst(
llvm::LandingPadInst& LI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:172
Parameters
¶llvm::Instruction* visitLoadInst(
llvm::LoadInst& LI)
llvm::Instruction* visitLoadInst(
llvm::LoadInst& LI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:156
Parameters
- llvm::LoadInst& LI
¶llvm::Instruction* visitMul(
llvm::BinaryOperator& I)
llvm::Instruction* visitMul(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:95
Parameters
¶llvm::Instruction* visitOr(
llvm::BinaryOperator& I)
llvm::Instruction* visitOr(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:108
Parameters
¶llvm::Instruction* visitPHINode(llvm::PHINode& PN)
llvm::Instruction* visitPHINode(llvm::PHINode& PN)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:149
Parameters
- llvm::PHINode& PN
¶llvm::Instruction* visitPtrToInt(
llvm::PtrToIntInst& CI)
llvm::Instruction* visitPtrToInt(
llvm::PtrToIntInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:138
Parameters
¶llvm::Instruction* visitReturnInst(
llvm::ReturnInst& RI)
llvm::Instruction* visitReturnInst(
llvm::ReturnInst& RI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:163
Parameters
- llvm::ReturnInst& RI
¶llvm::Instruction* visitSDiv(
llvm::BinaryOperator& I)
llvm::Instruction* visitSDiv(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:104
Parameters
¶llvm::Instruction* visitSExt(llvm::SExtInst& CI)
llvm::Instruction* visitSExt(llvm::SExtInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:131
Parameters
- llvm::SExtInst& CI
¶llvm::Instruction* visitSIToFP(llvm::CastInst& CI)
llvm::Instruction* visitSIToFP(llvm::CastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:137
Parameters
- llvm::CastInst& CI
¶llvm::Instruction* visitSRem(
llvm::BinaryOperator& I)
llvm::Instruction* visitSRem(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:98
Parameters
¶llvm::Instruction* visitSelectInst(
llvm::SelectInst& SI)
llvm::Instruction* visitSelectInst(
llvm::SelectInst& SI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:143
Parameters
- llvm::SelectInst& SI
¶llvm::Instruction* visitShl(
llvm::BinaryOperator& I)
llvm::Instruction* visitShl(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:111
Parameters
¶llvm::Instruction* visitShuffleVectorInst(
llvm::ShuffleVectorInst& SVI)
llvm::Instruction* visitShuffleVectorInst(
llvm::ShuffleVectorInst& SVI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:170
Parameters
¶llvm::Instruction* visitStoreInst(
llvm::StoreInst& SI)
llvm::Instruction* visitStoreInst(
llvm::StoreInst& SI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:157
Parameters
- llvm::StoreInst& SI
¶llvm::Instruction* visitSub(
llvm::BinaryOperator& I)
llvm::Instruction* visitSub(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:93
Parameters
¶llvm::Instruction* visitSwitchInst(
llvm::SwitchInst& SI)
llvm::Instruction* visitSwitchInst(
llvm::SwitchInst& SI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:162
Parameters
- llvm::SwitchInst& SI
¶llvm::Instruction* visitTrunc(llvm::TruncInst& CI)
llvm::Instruction* visitTrunc(llvm::TruncInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:129
Parameters
- llvm::TruncInst& CI
¶llvm::Instruction* visitUDiv(
llvm::BinaryOperator& I)
llvm::Instruction* visitUDiv(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:103
Parameters
¶llvm::Instruction* visitUIToFP(llvm::CastInst& CI)
llvm::Instruction* visitUIToFP(llvm::CastInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:136
Parameters
- llvm::CastInst& CI
¶llvm::Instruction* visitURem(
llvm::BinaryOperator& I)
llvm::Instruction* visitURem(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:97
Parameters
¶llvm::Instruction* visitUnconditionalBranchInst(
llvm::BranchInst& BI)
llvm::Instruction* visitUnconditionalBranchInst(
llvm::BranchInst& BI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:159
Parameters
- llvm::BranchInst& BI
¶llvm::Instruction* visitUnreachableInst(
llvm::UnreachableInst& I)
llvm::Instruction* visitUnreachableInst(
llvm::UnreachableInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:164
Parameters
¶llvm::Instruction* visitVAEndInst(
llvm::VAEndInst& I)
llvm::Instruction* visitVAEndInst(
llvm::VAEndInst& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:173
Parameters
¶llvm::Instruction* visitXor(
llvm::BinaryOperator& I)
llvm::Instruction* visitXor(
llvm::BinaryOperator& I)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:110
Parameters
¶llvm::Instruction* visitZExt(llvm::ZExtInst& CI)
llvm::Instruction* visitZExt(llvm::ZExtInst& CI)
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:130
Parameters
- llvm::ZExtInst& CI
¶bool willNotOverflow(
BinaryOperator::BinaryOps Opcode,
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
bool willNotOverflow(
BinaryOperator::BinaryOps Opcode,
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:308
Parameters
- BinaryOperator::BinaryOps Opcode
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
- bool IsSigned
¶bool willNotOverflowAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
bool willNotOverflowAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:266
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
- bool IsSigned
¶bool willNotOverflowMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
bool willNotOverflowMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:302
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
- bool IsSigned
¶bool willNotOverflowSignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowSignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:254
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶bool willNotOverflowSignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowSignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:290
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶bool willNotOverflowSignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowSignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:272
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶bool willNotOverflowSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
bool willNotOverflowSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI,
bool IsSigned) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:284
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
- bool IsSigned
¶bool willNotOverflowUnsignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowUnsignedAdd(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:260
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶bool willNotOverflowUnsignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowUnsignedMul(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:296
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶bool willNotOverflowUnsignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
bool willNotOverflowUnsignedSub(
const llvm::Value* LHS,
const llvm::Value* RHS,
const llvm::Instruction& CxtI) const
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:278
Parameters
- const llvm::Value* LHS
- const llvm::Value* RHS
- const llvm::Instruction& CxtI
¶virtual ~InstCombinerImpl()
virtual ~InstCombinerImpl()
Declared at: llvm/lib/Transforms/InstCombine/InstCombineInternal.h:74