LLVM 18.0.0git
|
The core instruction combiner logic. More...
#include "llvm/Transforms/InstCombine/InstCombiner.h"
Public Types | |
using | BuilderTy = IRBuilder< TargetFolder, IRBuilderCallbackInserter > |
An IRBuilder that automatically inserts new instructions into the worklist. | |
Static Public Member Functions | |
static Value * | peekThroughBitcast (Value *V, bool OneUseOnly=false) |
Return the source operand of a potentially bitcasted value while optionally checking if it has one use. | |
static unsigned | getComplexity (Value *V) |
Assign a complexity or rank value to LLVM Values. | |
static bool | isCanonicalPredicate (CmpInst::Predicate Pred) |
Predicate canonicalization reduces the number of patterns that need to be matched by other transforms. | |
static bool | isSignBitCheck (ICmpInst::Predicate Pred, const APInt &RHS, bool &TrueIfSigned) |
Given an exploded icmp instruction, return true if the comparison only checks the sign bit. | |
static Constant * | AddOne (Constant *C) |
Add one to a Constant. | |
static Constant * | SubOne (Constant *C) |
Subtract one from a Constant. | |
static std::optional< std::pair< CmpInst::Predicate, Constant * > > | getFlippedStrictnessPredicateAndConstant (CmpInst::Predicate Pred, Constant *C) |
static bool | shouldAvoidAbsorbingNotIntoSelect (const SelectInst &SI) |
static Value * | getFreelyInvertedImpl (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume, unsigned Depth) |
Return nonnull value if V is free to invert under the condition of WillInvertAllUses. | |
static Value * | getFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume) |
static Value * | getFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder) |
static bool | isFreeToInvert (Value *V, bool WillInvertAllUses, bool &DoesConsume) |
Return true if the specified value is free to invert (apply ~ to). | |
static bool | isFreeToInvert (Value *V, bool WillInvertAllUses) |
static bool | canFreelyInvertAllUsersOf (Instruction *V, Value *IgnoredUser) |
Given i1 V, can every user of V be freely adapted if V is changed to !V ? InstCombine's freelyInvertAllUsersOf() must be kept in sync with this fn. | |
static Constant * | getSafeVectorConstantForBinop (BinaryOperator::BinaryOps Opcode, Constant *In, bool IsRHSConstant) |
Some binary operators require special handling to avoid poison and undefined behavior. | |
Public Attributes | |
uint64_t | MaxArraySizeForCombine = 0 |
Maximum size of array considered when transforming. | |
BuilderTy & | Builder |
Protected Attributes | |
InstructionWorklist & | Worklist |
A worklist of the instructions that need to be simplified. | |
const bool | MinimizeSize |
AAResults * | AA |
AssumptionCache & | AC |
TargetLibraryInfo & | TLI |
DominatorTree & | DT |
const DataLayout & | DL |
const SimplifyQuery | SQ |
OptimizationRemarkEmitter & | ORE |
BlockFrequencyInfo * | BFI |
ProfileSummaryInfo * | PSI |
LoopInfo * | LI |
bool | MadeIRChange = false |
SmallDenseSet< std::pair< BasicBlock *, BasicBlock * >, 8 > | DeadEdges |
Edges that are known to never be taken. | |
SmallDenseMap< BasicBlock *, SmallVector< BasicBlock * >, 8 > | PredOrder |
Order of predecessors to canonicalize phi nodes towards. | |
The core instruction combiner logic.
This class provides both the logic to recursively visit instructions and combine them.
Definition at line 46 of file InstCombiner.h.
An IRBuilder that automatically inserts new instructions into the worklist.
Definition at line 58 of file InstCombiner.h.
|
inline |
Definition at line 93 of file InstCombiner.h.
|
virtualdefault |
Add one to a Constant.
Definition at line 209 of file InstCombiner.h.
References C.
Referenced by llvm::InstCombinerImpl::foldAddWithConstant(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 370 of file InstCombiner.h.
References I, and llvm::InstructionWorklist::push().
Referenced by llvm::InstCombinerImpl::addDeadEdge(), llvm::InstCombinerImpl::freelyInvertAllUsersOf(), getShiftedValue(), processUMulZExtIdiom(), replaceExtractElements(), rewriteGEPAsOffset(), and llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic().
|
inlinestatic |
Given i1 V, can every user of V be freely adapted if V is changed to !V ? InstCombine's freelyInvertAllUsersOf() must be kept in sync with this fn.
NOTE: for Instructions only!
See also: isFreeToInvert()
Definition at line 282 of file InstCombiner.h.
References assert(), I, and llvm::PatternMatch::match().
Referenced by canFreelyInvert(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().
|
inline |
Definition at line 465 of file InstCombiner.h.
References llvm::computeKnownBits(), llvm::Depth, and llvm::SimplifyQuery::getWithInstruction().
Referenced by canReplaceGEPIdxWithZero(), llvm::InstCombinerImpl::foldAddWithConstant(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithZero(), isKnownExactCastIntToFP(), matchFunnelShift(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), llvm::InstCombinerImpl::simplifyRangeCheck(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitSwitchInst().
|
inline |
Definition at line 470 of file InstCombiner.h.
References llvm::computeKnownBits(), llvm::Depth, and llvm::SimplifyQuery::getWithInstruction().
|
inline |
Definition at line 491 of file InstCombiner.h.
References llvm::ComputeMaxSignificantBits(), llvm::Depth, and DL.
Referenced by processUGT_ADDCST_ADD().
|
inline |
Definition at line 486 of file InstCombiner.h.
References llvm::ComputeNumSignBits(), llvm::Depth, and DL.
Referenced by canEvaluateTruncated(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitAdd(), and llvm::InstCombinerImpl::visitSExt().
|
inline |
Definition at line 518 of file InstCombiner.h.
References llvm::computeOverflowForSignedAdd(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
inline |
Definition at line 503 of file InstCombiner.h.
References llvm::computeOverflowForSignedMul(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
inline |
Definition at line 532 of file InstCombiner.h.
References llvm::computeOverflowForSignedSub(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
inline |
Definition at line 510 of file InstCombiner.h.
References llvm::computeOverflowForUnsignedAdd(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
inline |
Definition at line 496 of file InstCombiner.h.
References llvm::computeOverflowForUnsignedMul(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
inline |
Definition at line 525 of file InstCombiner.h.
References llvm::computeOverflowForUnsignedSub(), llvm::SimplifyQuery::getWithInstruction(), LHS, and RHS.
Referenced by llvm::InstCombinerImpl::computeOverflow().
|
pure virtual |
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.
Implemented in llvm::InstCombinerImpl.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineST1ScatterIndex(), instCombineSVEST1(), modifyIntrinsicCall(), and simplifyX86MaskedStore().
|
inline |
Definition at line 372 of file InstCombiner.h.
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), foldCttzCtlz(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), and llvm::InstCombinerImpl::visitCallInst().
|
inline |
Definition at line 380 of file InstCombiner.h.
Assign a complexity or rank value to LLVM Values.
This is used to reduce the amount of pattern matching needed for compares and commutative instructions. For example, if we have: icmp ugt X, Constant or xor (add X, Constant), cast Z
We do not have to consider the commuted variants of these patterns because canonicalization based on complexity guarantees the above ordering.
This routine maps IR values to various complexity ranks: 0 -> undef 1 -> Constants 2 -> Other non-instructions 3 -> Arguments 4 -> Cast and (f)neg/not instructions 5 -> Other instructions
Definition at line 134 of file InstCombiner.h.
References llvm::PatternMatch::m_FNeg(), and llvm::PatternMatch::match().
Referenced by llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitICmpInst().
|
inline |
Definition at line 375 of file InstCombiner.h.
References DL.
Referenced by canEvaluateTruncated(), canReplaceGEPIdxWithZero(), llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), combineLoadToOperationType(), foldCttzCtlz(), foldSelectBinOpIdentity(), foldVecTruncToExtElt(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), likeBitCastFromVector(), optimizeIntegerToVectorInsertions(), optimizeVectorResizeWithIntegerBitCasts(), simplifyAllocaArraySize(), simplifyAMDGCNMemoryIntrinsicDemanded(), simplifyAssocCastAssoc(), unpackLoadToAggregate(), and unpackStoreToAggregate().
|
inline |
Definition at line 374 of file InstCombiner.h.
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), foldCttzCtlz(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), and llvm::InstCombinerImpl::visitCallInst().
|
static |
Definition at line 6441 of file InstCombineCompares.cpp.
References assert(), llvm::CallingConv::C, llvm::ConstantInt::get(), llvm::ConstantExpr::getAdd(), llvm::CmpInst::getFlippedStrictnessPredicate(), llvm::ICmpInst::getUnsignedPredicate(), llvm::CmpInst::ICMP_UGT, llvm::CmpInst::ICMP_ULE, llvm::CmpInst::isIntPredicate(), llvm::ICmpInst::isRelational(), llvm::CmpInst::isSigned(), and llvm::Constant::replaceUndefsWith().
Referenced by canonicalizeCmpWithConstant(), and llvm::InstCombinerImpl::matchThreeWayIntCompare().
|
inlinestatic |
Definition at line 254 of file InstCombiner.h.
|
inlinestatic |
Definition at line 247 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::foldICmpBitCast(), foldICmpOrXX(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitSub().
|
static |
Return nonnull value if V is free to invert under the condition of WillInvertAllUses.
If Builder is nonnull, it will return a simplified ~V. If Builder is null, it will return an arbitrary nonnull value (not dereferenceable). If the inversion will consume instructions, DoesConsume
will be set to true. Otherwise it will be false.
Definition at line 2109 of file InstructionCombining.cpp.
References A, assert(), B, Builder, llvm::CallingConv::C, Cond, llvm::IRBuilderBase::CreateAdd(), llvm::IRBuilderBase::CreateAShr(), llvm::IRBuilderBase::CreateBinaryIntrinsic(), llvm::IRBuilderBase::CreateCmp(), llvm::IRBuilderBase::CreateSelect(), llvm::IRBuilderBase::CreateSub(), llvm::IRBuilderBase::CreateXor(), llvm::Depth, getFreelyInvertedImpl(), llvm::IntrinsicInst::getIntrinsicID(), llvm::getInverseMinMaxIntrinsic(), llvm::ConstantExpr::getNot(), I, llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_AShr(), llvm::PatternMatch::m_ImmConstant(), llvm::PatternMatch::m_MaxOrMin(), llvm::PatternMatch::m_Not(), llvm::PatternMatch::m_Select(), llvm::PatternMatch::m_Sub(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_Xor(), llvm::PatternMatch::match(), llvm::MaxAnalysisRecursionDepth, and shouldAvoidAbsorbingNotIntoSelect().
Referenced by getFreelyInvertedImpl().
|
inline |
Definition at line 382 of file InstCombiner.h.
|
inline |
Definition at line 377 of file InstCombiner.h.
|
inline |
Definition at line 381 of file InstCombiner.h.
|
inlinestatic |
Some binary operators require special handling to avoid poison and undefined behavior.
If a constant vector has undef elements, replace those undefs with identity constants if possible because those are always safe to execute. If no identity constant exists, replace undef with some other safe constant.
Definition at line 318 of file InstCombiner.h.
References assert(), C, llvm_unreachable, and Opcode.
Referenced by llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), and llvm::InstCombinerImpl::foldVectorBinop().
|
inline |
Definition at line 376 of file InstCombiner.h.
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::Negator::Negate(), llvm::InstCombinerImpl::visitFNeg(), and llvm::InstCombinerImpl::visitFSub().
|
inline |
Definition at line 373 of file InstCombiner.h.
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul().
|
inline |
Inserts an instruction New
before instruction Old
.
Also adds the new instruction to the worklist and returns New
so that it is suitable for use as the return from the visitation patterns.
Definition at line 400 of file InstCombiner.h.
References llvm::InstructionWorklist::add(), and assert().
Referenced by llvm::InstCombinerImpl::foldIntegerTypedPHI(), foldOperationIntoSelectOperand(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgBinOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgExtractValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgGEPIntoPHI(), llvm::InstCombinerImpl::foldPHIArgInsertValueInstructionIntoPHI(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::foldPHIArgOpIntoPHI(), llvm::InstCombinerImpl::foldPHIArgZextsIntoPHI(), foldSelectZeroOrMul(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), replaceGEPIdxWithZero(), and simplifyAllocaArraySize().
|
inline |
Same as InsertNewInstBefore, but also sets the debug loc.
Definition at line 409 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::EvaluateInDifferentType(), getShiftedValue(), replaceExtractElements(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), and llvm::InstCombinerImpl::simplifyShrShlDemandedBits().
|
inlinestatic |
Predicate canonicalization reduces the number of patterns that need to be matched by other transforms.
For example, we may swap the operands of a conditional branch or select to create a compare with a canonical (inverted) predicate which is then more likely to be matched with other values.
Definition at line 152 of file InstCombiner.h.
Referenced by canonicalizeCmpWithConstant(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), and llvm::InstCombinerImpl::visitBranchInst().
Definition at line 272 of file InstCombiner.h.
|
inlinestatic |
Return true if the specified value is free to invert (apply ~ to).
This happens in cases where the ~ can be eliminated. If WillInvertAllUses is true, work under the assumption that the caller intends to remove all uses of V and only keep uses of ~V.
See also: canFreelyInvertAllUsersOf()
Definition at line 266 of file InstCombiner.h.
Referenced by canFreelyInvert(), matchDeMorgansLaws(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 475 of file InstCombiner.h.
References llvm::Depth, DL, and llvm::isKnownToBeAPowerOfTwo().
Referenced by foldCtpop(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), simplifyValueKnownNonZero(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitURem(), and llvm::InstCombinerImpl::visitXor().
|
inlinestatic |
Given an exploded icmp instruction, return true if the comparison only checks the sign bit.
If it only checks the sign bit, set TrueIfSigned if the result of the comparison is true when the input value is signed.
Definition at line 172 of file InstCombiner.h.
References RHS.
Referenced by llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpXorConstant(), and getDemandedBitsLHSMask().
Definition at line 189 of file InstructionCombining.cpp.
References llvm::TargetTransformInfo::isValidAddrSpaceCast().
|
inline |
Definition at line 481 of file InstCombiner.h.
References llvm::Depth, llvm::SimplifyQuery::getWithInstruction(), and llvm::MaskedValueIsZero().
Referenced by canEvaluateShiftedShift(), canEvaluateTruncated(), canEvaluateZExtd(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
inlinestatic |
Return the source operand of a potentially bitcasted value while optionally checking if it has one use.
If there is no bitcast or the one use check is not met, return the input value itself.
Definition at line 108 of file InstCombiner.h.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
|
inline |
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.
Definition at line 420 of file InstCombiner.h.
References llvm::dbgs(), I, LLVM_DEBUG, and llvm::InstructionWorklist::pushUsersToWorkList().
Referenced by llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldAllocaCmp(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpShlConstConst(), llvm::InstCombinerImpl::foldICmpShrConstConst(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithMinMaxImpl(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldItoFPtoI(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectZeroOrMul(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::freelyInvertAllUsersOf(), llvm::InstCombinerImpl::handleUnreachableFrom(), instCombineConvertFromSVBool(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineMaxMinNM(), instCombineRDFFR(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDup(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVELast(), instCombineSVELD1(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESel(), instCombineSVESrshl(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEVectorBinOp(), instCombineSVEVectorFuseMulAddSub(), instCombineSVEVectorMul(), instCombineSVEZip(), modifyIntrinsicCall(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::InstCombinerImpl::removeInstructionsBeforeUnreachable(), replaceExtractElements(), rewriteGEPAsOffset(), simplifyAllocaArraySize(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), simplifyIRemMulShl(), simplifyX86MaskedLoad(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), tryCombineFromSVBoolBinOp(), unpackLoadToAggregate(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFree(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
inline |
Replace operand of instruction and add old operand to the worklist.
Definition at line 444 of file InstCombiner.h.
References llvm::InstructionWorklist::handleUseCountDecrement(), and I.
Referenced by llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonIRemTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), foldCtpop(), foldCttzCtlz(), foldFabsWithFcmpZero(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpXorConstant(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), foldSelectBinOpIdentity(), foldSelectZeroOrMul(), foldShuffleWithInsert(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), simplifyAllocaArraySize(), simplifyAssocCastAssoc(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), simplifyValueKnownNonZero(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAtomicRMWInst(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitStoreInst(), and llvm::InstCombinerImpl::visitSwitchInst().
Replace use and add the previously used value to the worklist.
Definition at line 452 of file InstCombiner.h.
References llvm::InstructionWorklist::handleUseCountDecrement().
Referenced by llvm::InstCombinerImpl::addDeadEdge(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::InstCombinerImpl::SimplifyDemandedBits(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), and llvm::InstCombinerImpl::visitCallInst().
|
inlinestatic |
Definition at line 225 of file InstCombiner.h.
References llvm::PatternMatch::match(), and SI().
Referenced by getFreelyInvertedImpl().
|
pure virtual |
Implemented in llvm::InstCombinerImpl.
Referenced by llvm::ARMTTIImpl::instCombineIntrinsic().
|
pure virtual |
Implemented in llvm::InstCombinerImpl.
Referenced by llvm::X86TTIImpl::instCombineIntrinsic().
Subtract one from a Constant.
Definition at line 214 of file InstCombiner.h.
References C.
Referenced by llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), and llvm::InstCombinerImpl::visitSub().
std::optional< Instruction * > InstCombiner::targetInstCombineIntrinsic | ( | IntrinsicInst & | II | ) |
Definition at line 156 of file InstructionCombining.cpp.
References llvm::CallBase::getCalledFunction(), llvm::TargetTransformInfo::instCombineIntrinsic(), and llvm::Function::isTargetIntrinsic().
Referenced by llvm::InstCombinerImpl::visitCallInst().
std::optional< Value * > InstCombiner::targetSimplifyDemandedUseBitsIntrinsic | ( | IntrinsicInst & | II, |
APInt | DemandedMask, | ||
KnownBits & | Known, | ||
bool & | KnownBitsComputed | ||
) |
Definition at line 164 of file InstructionCombining.cpp.
References llvm::CallBase::getCalledFunction(), llvm::Function::isTargetIntrinsic(), and llvm::TargetTransformInfo::simplifyDemandedUseBitsIntrinsic().
Referenced by llvm::InstCombinerImpl::SimplifyDemandedUseBits().
std::optional< Value * > InstCombiner::targetSimplifyDemandedVectorEltsIntrinsic | ( | IntrinsicInst & | II, |
APInt | DemandedElts, | ||
APInt & | UndefElts, | ||
APInt & | UndefElts2, | ||
APInt & | UndefElts3, | ||
std::function< void(Instruction *, unsigned, APInt, APInt &)> | SimplifyAndSetOp | ||
) |
Definition at line 175 of file InstructionCombining.cpp.
References llvm::CallBase::getCalledFunction(), llvm::Function::isTargetIntrinsic(), and llvm::TargetTransformInfo::simplifyDemandedVectorEltsIntrinsic().
Referenced by llvm::InstCombinerImpl::SimplifyDemandedVectorElts().
|
protected |
Definition at line 68 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitLoadInst(), and llvm::InstCombinerImpl::visitStoreInst().
|
protected |
Definition at line 71 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitPHINode(), and llvm::InstCombinerImpl::visitStoreInst().
|
protected |
Definition at line 77 of file InstCombiner.h.
BuilderTy& llvm::InstCombiner::Builder |
Definition at line 59 of file InstCombiner.h.
Referenced by canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), llvm::InstCombinerImpl::combineLoadToNewType(), combineStoreToNewValue(), llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldBinOpOfSelectAndCastOfSelectCondition(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpDivConstant(), llvm::InstCombinerImpl::foldICmpEqIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpEquality(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpOrConstant(), foldICmpOrXX(), llvm::InstCombinerImpl::foldICmpSelectConstant(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpShrConstant(), llvm::InstCombinerImpl::foldICmpSRemConstant(), llvm::InstCombinerImpl::foldICmpSubConstant(), llvm::InstCombinerImpl::foldICmpTruncConstant(), llvm::InstCombinerImpl::foldICmpTruncWithTruncOrExt(), llvm::InstCombinerImpl::foldICmpUsingBoolRange(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithDominatingICmp(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldLogicCastConstant(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSelectIntoOp(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldSquareSumFP(), llvm::InstCombinerImpl::foldSquareSumInt(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::foldVectorBinop(), foldVecTruncToExtElt(), freelyInvert(), getFreelyInvertedImpl(), getShiftedValue(), llvm::InstCombinerImpl::insertRangeTest(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::PPCTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineRDFFR(), instCombineST1ScatterIndex(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVELast(), instCombineSVELD1(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESel(), instCombineSVESrshl(), instCombineSVEST1(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEVectorBinOp(), instCombineSVEVectorFuseMulAddSub(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), modifyIntrinsicCall(), narrowUDivURem(), llvm::Negator::Negate(), optimizeIntegerToVectorInsertions(), llvm::InstCombinerImpl::OptimizePointerDifference(), optimizeVectorResizeWithIntegerBitCasts(), processPhiNode(), processUGT_ADDCST_ADD(), processUMulZExtIdiom(), llvm::InstCombinerImpl::pushFreezeToPreventPoisonFromPropagating(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::run(), llvm::InstCombinerImpl::SimplifyAddWithRemainder(), simplifyAllocaArraySize(), simplifyAMDGCNMemoryIntrinsicDemanded(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::simplifyBinOpSplats(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::X86TTIImpl::simplifyDemandedVectorEltsIntrinsic(), simplifyInvariantGroupIntrinsic(), llvm::InstCombinerImpl::simplifyRangeCheck(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), simplifyUsingControlFlow(), simplifyValueKnownNonZero(), simplifyX86MaskedLoad(), simplifyX86MaskedStore(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp(), llvm::InstCombinerImpl::SliceUpIllegalIntegerPHI(), transformToIndexedCompare(), tryCombineFromSVBoolBinOp(), llvm::InstCombinerImpl::tryFactorizationFolds(), unpackLoadToAggregate(), unpackStoreToAggregate(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFPTrunc(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitSwitchInst(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
protected |
Edges that are known to never be taken.
Definition at line 87 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::addDeadEdge(), llvm::InstCombinerImpl::handlePotentiallyDeadBlocks(), and llvm::InstCombinerImpl::prepareWorklist().
|
protected |
Definition at line 74 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::EvaluateInDifferentType(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpShlConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithCastOp(), llvm::InstCombinerImpl::foldICmpWithConstant(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSelectShuffle(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldVectorBinop(), llvm::InstCombinerImpl::mergeStoreIntoSuccessor(), llvm::InstCombinerImpl::prepareWorklist(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFNeg(), llvm::InstCombinerImpl::visitFree(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitIntToPtr(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitStoreInst(), and llvm::InstCombinerImpl::visitTrunc().
|
protected |
Definition at line 73 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::dominatesAllUses(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::freezeOtherUses(), llvm::InstCombinerImpl::handlePotentiallyDeadBlocks(), llvm::InstCombinerImpl::prepareWorklist(), llvm::InstCombinerImpl::run(), llvm::InstCombinerImpl::SimplifyAnyMemSet(), llvm::InstCombinerImpl::SimplifyAnyMemTransfer(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitStoreInst(), and llvm::InstCombinerImpl::visitZExt().
|
protected |
Definition at line 82 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::combineLoadToNewType(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPHIArgLoadIntoPHI(), llvm::InstCombinerImpl::visitLandingPadInst(), llvm::InstCombinerImpl::visitLoadInst(), and llvm::InstCombinerImpl::visitStoreInst().
|
protected |
Definition at line 84 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::addDeadEdge(), llvm::InstCombinerImpl::handleUnreachableFrom(), llvm::InstCombinerImpl::prepareWorklist(), and llvm::InstCombinerImpl::run().
uint64_t llvm::InstCombiner::MaxArraySizeForCombine = 0 |
Maximum size of array considered when transforming.
Definition at line 54 of file InstCombiner.h.
Referenced by combineInstructionsOverFunction(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), unpackLoadToAggregate(), and unpackStoreToAggregate().
Definition at line 66 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::visitFree().
|
protected |
Definition at line 76 of file InstCombiner.h.
|
protected |
Order of predecessors to canonicalize phi nodes towards.
Definition at line 90 of file InstCombiner.h.
|
protected |
Definition at line 78 of file InstCombiner.h.
|
protected |
Definition at line 75 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpWithMinMaxImpl(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyMultipleUseDemandedBits(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::tryFactorizationFolds(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), llvm::InstCombinerImpl::visitFSub(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
protected |
Definition at line 72 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::prepareWorklist(), llvm::InstCombinerImpl::run(), llvm::InstCombinerImpl::tryToSinkInstruction(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), and llvm::InstCombinerImpl::visitFree().
|
protected |
A worklist of the instructions that need to be simplified.
Definition at line 63 of file InstCombiner.h.
Referenced by llvm::InstCombinerImpl::addDeadEdge(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::handlePotentiallyDeadBlocks(), llvm::InstCombinerImpl::handlePotentiallyDeadSuccessors(), llvm::InstCombinerImpl::handleUnreachableFrom(), llvm::InstCombinerImpl::matchBSwapOrBitReverse(), llvm::InstCombinerImpl::prepareWorklist(), llvm::InstCombinerImpl::run(), llvm::InstCombinerImpl::SimplifyDemandedVectorElts(), llvm::InstCombinerImpl::simplifyDivRemOfSelectWithZeroOp(), llvm::InstCombinerImpl::tryToSinkInstruction(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitBranchInst(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), and llvm::InstCombinerImpl::visitStoreInst().