LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
llvm::InstCombiner Class Referenceabstract

The core instruction combiner logic. More...

#include "llvm/Transforms/InstCombine/InstCombiner.h"

Inheritance diagram for llvm::InstCombiner:
Inheritance graph
[legend]

Public Types

using BuilderTy = IRBuilder< TargetFolder, IRBuilderCallbackInserter >
 An IRBuilder that automatically inserts new instructions into the worklist.
 

Public Member Functions

 InstCombiner (InstructionWorklist &Worklist, BuilderTy &Builder, bool MinimizeSize, AAResults *AA, AssumptionCache &AC, TargetLibraryInfo &TLI, TargetTransformInfo &TTI, DominatorTree &DT, OptimizationRemarkEmitter &ORE, BlockFrequencyInfo *BFI, BranchProbabilityInfo *BPI, ProfileSummaryInfo *PSI, const DataLayout &DL, ReversePostOrderTraversal< BasicBlock * > &RPOT)
 
virtual ~InstCombiner ()=default
 
ValuegetFreelyInvertedImpl (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume, unsigned Depth)
 Return nonnull value if V is free to invert under the condition of WillInvertAllUses.
 
ValuegetFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder, bool &DoesConsume)
 
ValuegetFreelyInverted (Value *V, bool WillInvertAllUses, BuilderTy *Builder)
 
bool isFreeToInvert (Value *V, bool WillInvertAllUses, bool &DoesConsume)
 Return true if the specified value is free to invert (apply ~ to).
 
bool isFreeToInvert (Value *V, bool WillInvertAllUses)
 
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.
 
void addToWorklist (Instruction *I)
 
AssumptionCachegetAssumptionCache () const
 
TargetLibraryInfogetTargetLibraryInfo () const
 
DominatorTreegetDominatorTree () const
 
const DataLayoutgetDataLayout () const
 
const SimplifyQuerygetSimplifyQuery () const
 
OptimizationRemarkEmittergetOptimizationRemarkEmitter () const
 
BlockFrequencyInfogetBlockFrequencyInfo () const
 
ProfileSummaryInfogetProfileSummaryInfo () const
 
std::optional< Instruction * > targetInstCombineIntrinsic (IntrinsicInst &II)
 
std::optional< Value * > targetSimplifyDemandedUseBitsIntrinsic (IntrinsicInst &II, APInt DemandedMask, KnownBits &Known, bool &KnownBitsComputed)
 
std::optional< Value * > targetSimplifyDemandedVectorEltsIntrinsic (IntrinsicInst &II, APInt DemandedElts, APInt &UndefElts, APInt &UndefElts2, APInt &UndefElts3, std::function< void(Instruction *, unsigned, APInt, APInt &)> SimplifyAndSetOp)
 
void computeBackEdges ()
 
bool isBackEdge (const BasicBlock *From, const BasicBlock *To)
 
InstructionInsertNewInstBefore (Instruction *New, BasicBlock::iterator Old)
 Inserts an instruction New before instruction Old.
 
InstructionInsertNewInstWith (Instruction *New, BasicBlock::iterator Old)
 Same as InsertNewInstBefore, but also sets the debug loc.
 
InstructionreplaceInstUsesWith (Instruction &I, Value *V)
 A combiner-aware RAUW-like routine.
 
InstructionreplaceOperand (Instruction &I, unsigned OpNum, Value *V)
 Replace operand of instruction and add old operand to the worklist.
 
void replaceUse (Use &U, Value *NewValue)
 Replace use and add the previously used value to the worklist.
 
virtual InstructioneraseInstFromFunction (Instruction &I)=0
 Combiner aware instruction erasure.
 
void computeKnownBits (const Value *V, KnownBits &Known, unsigned Depth, const Instruction *CxtI) const
 
KnownBits computeKnownBits (const Value *V, unsigned Depth, const Instruction *CxtI) const
 
bool isKnownToBeAPowerOfTwo (const Value *V, bool OrZero=false, unsigned Depth=0, const Instruction *CxtI=nullptr)
 
bool MaskedValueIsZero (const Value *V, const APInt &Mask, unsigned Depth=0, const Instruction *CxtI=nullptr) const
 
unsigned ComputeNumSignBits (const Value *Op, unsigned Depth=0, const Instruction *CxtI=nullptr) const
 
unsigned ComputeMaxSignificantBits (const Value *Op, unsigned Depth=0, const Instruction *CxtI=nullptr) const
 
OverflowResult computeOverflowForUnsignedMul (const Value *LHS, const Value *RHS, const Instruction *CxtI, bool IsNSW=false) const
 
OverflowResult computeOverflowForSignedMul (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
 
OverflowResult computeOverflowForUnsignedAdd (const WithCache< const Value * > &LHS, const WithCache< const Value * > &RHS, const Instruction *CxtI) const
 
OverflowResult computeOverflowForSignedAdd (const WithCache< const Value * > &LHS, const WithCache< const Value * > &RHS, const Instruction *CxtI) const
 
OverflowResult computeOverflowForUnsignedSub (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
 
OverflowResult computeOverflowForSignedSub (const Value *LHS, const Value *RHS, const Instruction *CxtI) const
 
virtual bool SimplifyDemandedBits (Instruction *I, unsigned OpNo, const APInt &DemandedMask, KnownBits &Known, unsigned Depth, const SimplifyQuery &Q)=0
 
bool SimplifyDemandedBits (Instruction *I, unsigned OpNo, const APInt &DemandedMask, KnownBits &Known)
 
virtual ValueSimplifyDemandedVectorElts (Value *V, APInt DemandedElts, APInt &UndefElts, unsigned Depth=0, bool AllowMultipleUsers=false)=0
 
bool isValidAddrSpaceCast (unsigned FromAS, unsigned ToAS) const
 

Static Public Member Functions

static ValuepeekThroughBitcast (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 (CmpPredicate Pred)
 Predicate canonicalization reduces the number of patterns that need to be matched by other transforms.
 
static ConstantAddOne (Constant *C)
 Add one to a Constant.
 
static ConstantSubOne (Constant *C)
 Subtract one from a Constant.
 
static std::optional< std::pair< CmpPredicate, Constant * > > getFlippedStrictnessPredicateAndConstant (CmpPredicate Pred, Constant *C)
 
static bool shouldAvoidAbsorbingNotIntoSelect (const SelectInst &SI)
 
static ConstantgetSafeVectorConstantForBinop (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.
 
BuilderTyBuilder
 

Protected Attributes

InstructionWorklistWorklist
 A worklist of the instructions that need to be simplified.
 
const bool MinimizeSize
 
AAResultsAA
 
AssumptionCacheAC
 
TargetLibraryInfoTLI
 
DominatorTreeDT
 
const DataLayoutDL
 
SimplifyQuery SQ
 
OptimizationRemarkEmitterORE
 
BlockFrequencyInfoBFI
 
BranchProbabilityInfoBPI
 
ProfileSummaryInfoPSI
 
DomConditionCache DC
 
ReversePostOrderTraversal< BasicBlock * > & RPOT
 
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.
 
SmallDenseSet< std::pair< const BasicBlock *, const BasicBlock * >, 8 > BackEdges
 Backedges, used to avoid pushing instructions across backedges in cases where this may result in infinite combine loops.
 
bool ComputedBackEdges = false
 

Detailed Description

The core instruction combiner logic.

This class provides both the logic to recursively visit instructions and combine them.

Definition at line 48 of file InstCombiner.h.

Member Typedef Documentation

◆ BuilderTy

An IRBuilder that automatically inserts new instructions into the worklist.

Definition at line 60 of file InstCombiner.h.

Constructor & Destructor Documentation

◆ InstCombiner()

llvm::InstCombiner::InstCombiner ( InstructionWorklist Worklist,
BuilderTy Builder,
bool  MinimizeSize,
AAResults AA,
AssumptionCache AC,
TargetLibraryInfo TLI,
TargetTransformInfo TTI,
DominatorTree DT,
OptimizationRemarkEmitter ORE,
BlockFrequencyInfo BFI,
BranchProbabilityInfo BPI,
ProfileSummaryInfo PSI,
const DataLayout DL,
ReversePostOrderTraversal< BasicBlock * > &  RPOT 
)
inline

Definition at line 101 of file InstCombiner.h.

◆ ~InstCombiner()

virtual llvm::InstCombiner::~InstCombiner ( )
virtualdefault

Member Function Documentation

◆ AddOne()

static Constant * llvm::InstCombiner::AddOne ( Constant C)
inlinestatic

◆ addToWorklist()

void llvm::InstCombiner::addToWorklist ( Instruction I)
inline

◆ canFreelyInvertAllUsersOf()

bool llvm::InstCombiner::canFreelyInvertAllUsersOf ( Instruction V,
Value IgnoredUser 
)
inline

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 250 of file InstCombiner.h.

References assert(), and I.

Referenced by canFreelyInvert(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), llvm::InstCombinerImpl::sinkNotIntoLogicalOp(), and llvm::InstCombinerImpl::sinkNotIntoOtherHandOfLogicalOp().

◆ computeBackEdges()

void InstCombiner::computeBackEdges ( )

◆ computeKnownBits() [1/2]

void llvm::InstCombiner::computeKnownBits ( const Value V,
KnownBits Known,
unsigned  Depth,
const Instruction CxtI 
) const
inline

◆ computeKnownBits() [2/2]

KnownBits llvm::InstCombiner::computeKnownBits ( const Value V,
unsigned  Depth,
const Instruction CxtI 
) const
inline

◆ ComputeMaxSignificantBits()

unsigned llvm::InstCombiner::ComputeMaxSignificantBits ( const Value Op,
unsigned  Depth = 0,
const Instruction CxtI = nullptr 
) const
inline

◆ ComputeNumSignBits()

unsigned llvm::InstCombiner::ComputeNumSignBits ( const Value Op,
unsigned  Depth = 0,
const Instruction CxtI = nullptr 
) const
inline

◆ computeOverflowForSignedAdd()

OverflowResult llvm::InstCombiner::computeOverflowForSignedAdd ( const WithCache< const Value * > &  LHS,
const WithCache< const Value * > &  RHS,
const Instruction CxtI 
) const
inline

◆ computeOverflowForSignedMul()

OverflowResult llvm::InstCombiner::computeOverflowForSignedMul ( const Value LHS,
const Value RHS,
const Instruction CxtI 
) const
inline

◆ computeOverflowForSignedSub()

OverflowResult llvm::InstCombiner::computeOverflowForSignedSub ( const Value LHS,
const Value RHS,
const Instruction CxtI 
) const
inline

◆ computeOverflowForUnsignedAdd()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedAdd ( const WithCache< const Value * > &  LHS,
const WithCache< const Value * > &  RHS,
const Instruction CxtI 
) const
inline

◆ computeOverflowForUnsignedMul()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedMul ( const Value LHS,
const Value RHS,
const Instruction CxtI,
bool  IsNSW = false 
) const
inline

◆ computeOverflowForUnsignedSub()

OverflowResult llvm::InstCombiner::computeOverflowForUnsignedSub ( const Value LHS,
const Value RHS,
const Instruction CxtI 
) const
inline

◆ eraseInstFromFunction()

virtual Instruction * llvm::InstCombiner::eraseInstFromFunction ( Instruction I)
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 instCombineDMB(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), instCombineST1ScatterIndex(), instCombineSVENoActiveReplace(), instCombineSVENoActiveUnaryErase(), instCombineSVENoActiveZero(), instCombineSVEST1(), modifyIntrinsicCall(), and simplifyX86MaskedStore().

◆ getAssumptionCache()

AssumptionCache & llvm::InstCombiner::getAssumptionCache ( ) const
inline

◆ getBlockFrequencyInfo()

BlockFrequencyInfo * llvm::InstCombiner::getBlockFrequencyInfo ( ) const
inline

Definition at line 348 of file InstCombiner.h.

◆ getComplexity()

static unsigned llvm::InstCombiner::getComplexity ( Value V)
inlinestatic

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 -> Cast and (f)neg/not instructions 3 -> Other instructions and arguments

Definition at line 143 of file InstCombiner.h.

References llvm::PatternMatch::m_FNeg().

Referenced by llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::visitFCmpInst(), and llvm::InstCombinerImpl::visitICmpInst().

◆ getDataLayout()

const DataLayout & llvm::InstCombiner::getDataLayout ( ) const
inline

◆ getDominatorTree()

DominatorTree & llvm::InstCombiner::getDominatorTree ( ) const
inline

◆ getFlippedStrictnessPredicateAndConstant()

std::optional< std::pair< CmpPredicate, Constant * > > InstCombiner::getFlippedStrictnessPredicateAndConstant ( CmpPredicate  Pred,
Constant C 
)
static

◆ getFreelyInverted() [1/2]

Value * llvm::InstCombiner::getFreelyInverted ( Value V,
bool  WillInvertAllUses,
BuilderTy Builder 
)
inline

Definition at line 222 of file InstCombiner.h.

◆ getFreelyInverted() [2/2]

Value * llvm::InstCombiner::getFreelyInverted ( Value V,
bool  WillInvertAllUses,
BuilderTy Builder,
bool DoesConsume 
)
inline

◆ getFreelyInvertedImpl()

Value * InstCombiner::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.

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 2552 of file InstructionCombining.cpp.

References A, llvm::PHINode::addIncoming(), assert(), B, Builder, llvm::CallingConv::C, Cond, llvm::IRBuilderBase::CreateAdd(), llvm::IRBuilderBase::CreateAShr(), llvm::IRBuilderBase::CreateBinaryIntrinsic(), llvm::IRBuilderBase::CreateBinOp(), llvm::IRBuilderBase::CreateCmp(), llvm::IRBuilderBase::CreateLogicalOp(), llvm::IRBuilderBase::CreatePHI(), llvm::IRBuilderBase::CreateSelect(), llvm::IRBuilderBase::CreateSExt(), llvm::IRBuilderBase::CreateSub(), llvm::IRBuilderBase::CreateTrunc(), llvm::IRBuilderBase::CreateXor(), llvm::Depth, llvm::SmallVectorImpl< T >::emplace_back(), getFreelyInvertedImpl(), llvm::getInverseMinMaxIntrinsic(), llvm::ConstantExpr::getNot(), I, II, IsSelect(), llvm::PatternMatch::m_Add(), llvm::PatternMatch::m_And(), llvm::PatternMatch::m_AShr(), llvm::PatternMatch::m_ImmConstant(), llvm::PatternMatch::m_LogicalAnd(), llvm::PatternMatch::m_LogicalOr(), llvm::PatternMatch::m_MaxOrMin(), llvm::PatternMatch::m_Not(), llvm::PatternMatch::m_Or(), llvm::PatternMatch::m_Select(), llvm::PatternMatch::m_SExtLike(), llvm::PatternMatch::m_Sub(), llvm::PatternMatch::m_Trunc(), llvm::PatternMatch::m_Value(), llvm::PatternMatch::m_Xor(), llvm::PatternMatch::match(), llvm::MaxAnalysisRecursionDepth, llvm::IRBuilderBase::SetInsertPoint(), and shouldAvoidAbsorbingNotIntoSelect().

Referenced by getFreelyInvertedImpl().

◆ getOptimizationRemarkEmitter()

OptimizationRemarkEmitter & llvm::InstCombiner::getOptimizationRemarkEmitter ( ) const
inline

Definition at line 345 of file InstCombiner.h.

◆ getProfileSummaryInfo()

ProfileSummaryInfo * llvm::InstCombiner::getProfileSummaryInfo ( ) const
inline

Definition at line 349 of file InstCombiner.h.

◆ getSafeVectorConstantForBinop()

static Constant * llvm::InstCombiner::getSafeVectorConstantForBinop ( BinaryOperator::BinaryOps  Opcode,
Constant In,
bool  IsRHSConstant 
)
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 286 of file InstCombiner.h.

References assert(), C, and llvm_unreachable.

Referenced by llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectShuffleWith1Binop(), and llvm::InstCombinerImpl::foldVectorBinop().

◆ getSimplifyQuery()

const SimplifyQuery & llvm::InstCombiner::getSimplifyQuery ( ) const
inline

◆ getTargetLibraryInfo()

TargetLibraryInfo & llvm::InstCombiner::getTargetLibraryInfo ( ) const
inline

Definition at line 341 of file InstCombiner.h.

◆ InsertNewInstBefore()

Instruction * llvm::InstCombiner::InsertNewInstBefore ( Instruction New,
BasicBlock::iterator  Old 
)
inline

◆ InsertNewInstWith()

Instruction * llvm::InstCombiner::InsertNewInstWith ( Instruction New,
BasicBlock::iterator  Old 
)
inline

◆ isBackEdge()

bool llvm::InstCombiner::isBackEdge ( const BasicBlock From,
const BasicBlock To 
)
inline

◆ isCanonicalPredicate()

static bool llvm::InstCombiner::isCanonicalPredicate ( CmpPredicate  Pred)
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 160 of file InstCombiner.h.

Referenced by canonicalizeCmpWithConstant(), llvm::InstCombinerImpl::canonicalizeICmpPredicate(), and llvm::InstCombinerImpl::visitBranchInst().

◆ isFreeToInvert() [1/2]

bool llvm::InstCombiner::isFreeToInvert ( Value V,
bool  WillInvertAllUses 
)
inline

Definition at line 240 of file InstCombiner.h.

◆ isFreeToInvert() [2/2]

bool llvm::InstCombiner::isFreeToInvert ( Value V,
bool  WillInvertAllUses,
bool DoesConsume 
)
inline

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 234 of file InstCombiner.h.

Referenced by canFreelyInvert(), matchDeMorgansLaws(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitICmpInst(), and llvm::InstCombinerImpl::visitSub().

◆ isKnownToBeAPowerOfTwo()

bool llvm::InstCombiner::isKnownToBeAPowerOfTwo ( const Value V,
bool  OrZero = false,
unsigned  Depth = 0,
const Instruction CxtI = nullptr 
)
inline

◆ isValidAddrSpaceCast()

bool InstCombiner::isValidAddrSpaceCast ( unsigned  FromAS,
unsigned  ToAS 
) const

◆ MaskedValueIsZero()

bool llvm::InstCombiner::MaskedValueIsZero ( const Value V,
const APInt Mask,
unsigned  Depth = 0,
const Instruction CxtI = nullptr 
) const
inline

◆ peekThroughBitcast()

static Value * llvm::InstCombiner::peekThroughBitcast ( Value V,
bool  OneUseOnly = false 
)
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 119 of file InstCombiner.h.

Referenced by llvm::X86TTIImpl::instCombineIntrinsic().

◆ replaceInstUsesWith()

Instruction * llvm::InstCombiner::replaceInstUsesWith ( Instruction I,
Value V 
)
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 394 of file InstCombiner.h.

References llvm::dbgs(), I, LLVM_DEBUG, and llvm::InstructionWorklist::pushUsersToWorkList().

Referenced by llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), convertNvvmIntrinsicToLlvm(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldAggregateConstructionIntoAggregateReuse(), llvm::InstCombinerImpl::foldAllocaCmp(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), foldCtpop(), foldCttzCtlz(), llvm::InstCombinerImpl::foldDeadPhiWeb(), llvm::InstCombinerImpl::foldFCmpIntToFPConst(), foldFCmpWithFloorAndCeil(), llvm::InstCombinerImpl::foldFMulReassoc(), foldFPtoI(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), 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::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldIntegerTypedPHI(), llvm::InstCombinerImpl::foldItoFPtoI(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldPowiReassoc(), llvm::InstCombinerImpl::foldSelectOpOp(), llvm::InstCombinerImpl::foldSelectShuffle(), foldSelectZeroOrMul(), llvm::InstCombinerImpl::FoldShiftByConstant(), llvm::InstCombinerImpl::foldVariableSignZeroExtensionOfVariableHighBitExtract(), llvm::InstCombinerImpl::freelyInvertAllUsersOf(), handleSpaceCheckIntrinsics(), llvm::InstCombinerImpl::handleUnreachableFrom(), instCombineConvertFromSVBool(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineLD1GatherIndex(), instCombineMaxMinNM(), instCombineRDFFR(), instCombineSVEAllOrNoActive(), instCombineSVECmpNE(), instCombineSVECntElts(), instCombineSVECondLast(), instCombineSVEDup(), instCombineSVEDupqLane(), instCombineSVEDupX(), instCombineSVEInsr(), instCombineSVELast(), instCombineSVELD1(), instCombineSVENoActiveReplace(), instCombineSVENoActiveZero(), instCombineSVEPTest(), instCombineSVESDIV(), instCombineSVESel(), instCombineSVESrshl(), instCombineSVETBL(), instCombineSVEUnpack(), instCombineSVEUzp1(), 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(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), 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().

◆ replaceOperand()

Instruction * llvm::InstCombiner::replaceOperand ( Instruction I,
unsigned  OpNum,
Value V 
)
inline

Replace operand of instruction and add old operand to the worklist.

Definition at line 418 of file InstCombiner.h.

References llvm::InstructionWorklist::handleUseCountDecrement(), and I.

Referenced by llvm::InstCombinerImpl::commonIDivRemTransforms(), llvm::InstCombinerImpl::commonIDivTransforms(), llvm::InstCombinerImpl::commonShiftTransforms(), foldCtpop(), foldCttzCtlz(), foldFabsWithFcmpZero(), foldFCmpFSubIntoFCmp(), llvm::InstCombinerImpl::foldICmpXorConstant(), llvm::InstCombinerImpl::foldPHIArgIntToPtrToPHI(), foldSelectBinOpIdentity(), foldSelectZeroOrMul(), foldShuffleWithInsert(), foldSqrtWithFcmpZero(), llvm::GCNTTIImpl::instCombineIntrinsic(), llvm::ARMTTIImpl::instCombineIntrinsic(), llvm::X86TTIImpl::instCombineIntrinsic(), instCombineSVEAllOrNoActiveUnary(), 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::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitStoreInst(), and llvm::InstCombinerImpl::visitSwitchInst().

◆ replaceUse()

void llvm::InstCombiner::replaceUse ( Use U,
Value NewValue 
)
inline

◆ shouldAvoidAbsorbingNotIntoSelect()

static bool llvm::InstCombiner::shouldAvoidAbsorbingNotIntoSelect ( const SelectInst SI)
inlinestatic

Definition at line 193 of file InstCombiner.h.

References SI().

Referenced by getFreelyInvertedImpl().

◆ SimplifyDemandedBits() [1/2]

bool llvm::InstCombiner::SimplifyDemandedBits ( Instruction I,
unsigned  OpNo,
const APInt DemandedMask,
KnownBits Known 
)
inline

Definition at line 518 of file InstCombiner.h.

References llvm::SimplifyQuery::getWithInstruction(), and I.

◆ SimplifyDemandedBits() [2/2]

virtual bool llvm::InstCombiner::SimplifyDemandedBits ( Instruction I,
unsigned  OpNo,
const APInt DemandedMask,
KnownBits Known,
unsigned  Depth,
const SimplifyQuery Q 
)
pure virtual

◆ SimplifyDemandedVectorElts()

virtual Value * llvm::InstCombiner::SimplifyDemandedVectorElts ( Value V,
APInt  DemandedElts,
APInt UndefElts,
unsigned  Depth = 0,
bool  AllowMultipleUsers = false 
)
pure virtual

◆ SubOne()

static Constant * llvm::InstCombiner::SubOne ( Constant C)
inlinestatic

◆ targetInstCombineIntrinsic()

std::optional< Instruction * > InstCombiner::targetInstCombineIntrinsic ( IntrinsicInst II)

◆ targetSimplifyDemandedUseBitsIntrinsic()

std::optional< Value * > InstCombiner::targetSimplifyDemandedUseBitsIntrinsic ( IntrinsicInst II,
APInt  DemandedMask,
KnownBits Known,
bool KnownBitsComputed 
)

◆ targetSimplifyDemandedVectorEltsIntrinsic()

std::optional< Value * > InstCombiner::targetSimplifyDemandedVectorEltsIntrinsic ( IntrinsicInst II,
APInt  DemandedElts,
APInt UndefElts,
APInt UndefElts2,
APInt UndefElts3,
std::function< void(Instruction *, unsigned, APInt, APInt &)>  SimplifyAndSetOp 
)

Member Data Documentation

◆ AA

AAResults* llvm::InstCombiner::AA
protected

◆ AC

AssumptionCache& llvm::InstCombiner::AC
protected

◆ BackEdges

SmallDenseSet<std::pair<const BasicBlock *, const BasicBlock *>, 8> llvm::InstCombiner::BackEdges
protected

Backedges, used to avoid pushing instructions across backedges in cases where this may result in infinite combine loops.

For irreducible loops this picks an arbitrary backedge.

Definition at line 97 of file InstCombiner.h.

Referenced by computeBackEdges().

◆ BFI

BlockFrequencyInfo* llvm::InstCombiner::BFI
protected

Definition at line 79 of file InstCombiner.h.

◆ BPI

BranchProbabilityInfo* llvm::InstCombiner::BPI
protected

◆ Builder

BuilderTy& llvm::InstCombiner::Builder

Definition at line 61 of file InstCombiner.h.

Referenced by canonicalizeBitCastExtElt(), llvm::InstCombinerImpl::canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract(), canonicalizeGEPOfConstGEPI8(), 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::foldFMulReassoc(), llvm::InstCombinerImpl::foldFreezeIntoRecurrence(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpAndConstant(), llvm::InstCombinerImpl::foldICmpAndConstConst(), llvm::InstCombinerImpl::foldICmpAndShift(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpBitCast(), llvm::InstCombinerImpl::foldICmpCommutative(), 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(), foldICmpWithLowBitMaskedVal(), llvm::InstCombinerImpl::foldICmpWithTrunc(), llvm::InstCombinerImpl::foldICmpWithZextOrSext(), llvm::InstCombinerImpl::foldICmpXorShiftConst(), llvm::InstCombinerImpl::foldIRemByPowerOfTwoToBitTest(), foldLogicCastConstant(), llvm::InstCombinerImpl::foldMultiplicationOverflowCheck(), llvm::InstCombinerImpl::foldPowiReassoc(), 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(), foldVecExtTruncToExtElt(), 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(), instCombineSVEUzp1(), instCombineSVEVectorBinOp(), instCombineSVEVectorFuseMulAddSub(), matchDeMorgansLaws(), 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(), simplifyAndOrWithOpReplaced(), 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(), llvm::InstCombinerImpl::tryFoldInstWithCtpopWithNot(), 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().

◆ ComputedBackEdges

bool llvm::InstCombiner::ComputedBackEdges = false
protected

Definition at line 98 of file InstCombiner.h.

Referenced by computeBackEdges().

◆ DC

DomConditionCache llvm::InstCombiner::DC
protected

◆ DeadEdges

SmallDenseSet<std::pair<BasicBlock *, BasicBlock *>, 8> llvm::InstCombiner::DeadEdges
protected

◆ DL

const DataLayout& llvm::InstCombiner::DL
protected

Definition at line 76 of file InstCombiner.h.

Referenced by llvm::InstCombinerImpl::commonCastTransforms(), llvm::InstCombinerImpl::EvaluateInDifferentType(), llvm::InstCombinerImpl::foldBinOpShiftWithShift(), llvm::InstCombinerImpl::foldBinopWithPhiOperands(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), llvm::InstCombinerImpl::foldFMulReassoc(), llvm::InstCombinerImpl::foldGEPICmp(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpInstWithConstantNotInt(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithCastOp(), llvm::InstCombinerImpl::foldICmpWithConstant(), 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::tryFoldInstWithCtpopWithNot(), llvm::InstCombinerImpl::visitAllocaInst(), llvm::InstCombinerImpl::visitAllocSite(), llvm::InstCombinerImpl::visitAnd(), 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::visitMul(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSub(), and llvm::InstCombinerImpl::visitTrunc().

◆ DT

DominatorTree& llvm::InstCombiner::DT
protected

◆ MadeIRChange

bool llvm::InstCombiner::MadeIRChange = false
protected

◆ MaxArraySizeForCombine

uint64_t llvm::InstCombiner::MaxArraySizeForCombine = 0

Maximum size of array considered when transforming.

Definition at line 56 of file InstCombiner.h.

Referenced by combineInstructionsOverFunction(), llvm::InstCombinerImpl::foldCmpLoadFromIndexedGlobal(), unpackLoadToAggregate(), and unpackStoreToAggregate().

◆ MinimizeSize

const bool llvm::InstCombiner::MinimizeSize
protected

Definition at line 68 of file InstCombiner.h.

Referenced by llvm::InstCombinerImpl::visitFree().

◆ ORE

OptimizationRemarkEmitter& llvm::InstCombiner::ORE
protected

Definition at line 78 of file InstCombiner.h.

◆ PredOrder

SmallDenseMap<BasicBlock *, SmallVector<BasicBlock *>, 8> llvm::InstCombiner::PredOrder
protected

Order of predecessors to canonicalize phi nodes towards.

Definition at line 92 of file InstCombiner.h.

◆ PSI

ProfileSummaryInfo* llvm::InstCombiner::PSI
protected

Definition at line 81 of file InstCombiner.h.

◆ RPOT

ReversePostOrderTraversal<BasicBlock *>& llvm::InstCombiner::RPOT
protected

Definition at line 84 of file InstCombiner.h.

Referenced by computeBackEdges(), and llvm::InstCombinerImpl::prepareWorklist().

◆ SQ

SimplifyQuery llvm::InstCombiner::SQ
protected

Definition at line 77 of file InstCombiner.h.

Referenced by llvm::InstCombinerImpl::commonShiftTransforms(), llvm::InstCombinerImpl::foldAddWithConstant(), llvm::InstCombinerImpl::foldICmpAddConstant(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithZero(), llvm::InstCombinerImpl::foldOpIntoPhi(), llvm::InstCombinerImpl::foldSelectICmp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), llvm::InstCombinerImpl::tryFactorizationFolds(), llvm::InstCombinerImpl::visitAdd(), 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::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), 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::visitSIToFP(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitTrunc(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitUIToFP(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().

◆ TLI

TargetLibraryInfo& llvm::InstCombiner::TLI
protected

◆ Worklist

InstructionWorklist& llvm::InstCombiner::Worklist
protected

The documentation for this class was generated from the following files: