LLVM 22.0.0git
InstructionSimplify.h File Reference

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Functions

LLVM_ABI Valuellvm::simplifyAddInst (Value *LHS, Value *RHS, bool IsNSW, bool IsNUW, const SimplifyQuery &Q)
 Given operands for an Add, fold the result or return null.
LLVM_ABI Valuellvm::simplifySubInst (Value *LHS, Value *RHS, bool IsNSW, bool IsNUW, const SimplifyQuery &Q)
 Given operands for a Sub, fold the result or return null.
LLVM_ABI Valuellvm::simplifyMulInst (Value *LHS, Value *RHS, bool IsNSW, bool IsNUW, const SimplifyQuery &Q)
 Given operands for a Mul, fold the result or return null.
LLVM_ABI Valuellvm::simplifySDivInst (Value *LHS, Value *RHS, bool IsExact, const SimplifyQuery &Q)
 Given operands for an SDiv, fold the result or return null.
LLVM_ABI Valuellvm::simplifyUDivInst (Value *LHS, Value *RHS, bool IsExact, const SimplifyQuery &Q)
 Given operands for a UDiv, fold the result or return null.
LLVM_ABI Valuellvm::simplifySRemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an SRem, fold the result or return null.
LLVM_ABI Valuellvm::simplifyURemInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a URem, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFNegInst (Value *Op, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operand for an FNeg, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFAddInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for an FAdd, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFSubInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for an FSub, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFMulInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for an FMul, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFMAFMul (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for the multiplication of a FMA, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFDivInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for an FDiv, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFRemInst (Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q, fp::ExceptionBehavior ExBehavior=fp::ebIgnore, RoundingMode Rounding=RoundingMode::NearestTiesToEven)
 Given operands for an FRem, fold the result or return null.
LLVM_ABI Valuellvm::simplifyShlInst (Value *Op0, Value *Op1, bool IsNSW, bool IsNUW, const SimplifyQuery &Q)
 Given operands for a Shl, fold the result or return null.
LLVM_ABI Valuellvm::simplifyLShrInst (Value *Op0, Value *Op1, bool IsExact, const SimplifyQuery &Q)
 Given operands for a LShr, fold the result or return null.
LLVM_ABI Valuellvm::simplifyAShrInst (Value *Op0, Value *Op1, bool IsExact, const SimplifyQuery &Q)
 Given operands for a AShr, fold the result or return nulll.
LLVM_ABI Valuellvm::simplifyAndInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an And, fold the result or return null.
LLVM_ABI Valuellvm::simplifyOrInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an Or, fold the result or return null.
LLVM_ABI Valuellvm::simplifyXorInst (Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an Xor, fold the result or return null.
LLVM_ABI Valuellvm::simplifyICmpInst (CmpPredicate Pred, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for an ICmpInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyFCmpInst (CmpPredicate Predicate, Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for an FCmpInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifySelectInst (Value *Cond, Value *TrueVal, Value *FalseVal, const SimplifyQuery &Q)
 Given operands for a SelectInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyGEPInst (Type *SrcTy, Value *Ptr, ArrayRef< Value * > Indices, GEPNoWrapFlags NW, const SimplifyQuery &Q)
 Given operands for a GetElementPtrInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyInsertValueInst (Value *Agg, Value *Val, ArrayRef< unsigned > Idxs, const SimplifyQuery &Q)
 Given operands for an InsertValueInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyInsertElementInst (Value *Vec, Value *Elt, Value *Idx, const SimplifyQuery &Q)
 Given operands for an InsertElement, fold the result or return null.
LLVM_ABI Valuellvm::simplifyExtractValueInst (Value *Agg, ArrayRef< unsigned > Idxs, const SimplifyQuery &Q)
 Given operands for an ExtractValueInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyExtractElementInst (Value *Vec, Value *Idx, const SimplifyQuery &Q)
 Given operands for an ExtractElementInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyCastInst (unsigned CastOpc, Value *Op, Type *Ty, const SimplifyQuery &Q)
 Given operands for a CastInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyBinaryIntrinsic (Intrinsic::ID IID, Type *ReturnType, Value *Op0, Value *Op1, const SimplifyQuery &Q, const CallBase *Call)
 Given operands for a BinaryIntrinsic, fold the result or return null.
LLVM_ABI Valuellvm::simplifyShuffleVectorInst (Value *Op0, Value *Op1, ArrayRef< int > Mask, Type *RetTy, const SimplifyQuery &Q)
 Given operands for a ShuffleVectorInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyCmpInst (CmpPredicate Predicate, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a CmpInst, fold the result or return null.
LLVM_ABI Valuellvm::simplifyUnOp (unsigned Opcode, Value *Op, const SimplifyQuery &Q)
 Given operand for a UnaryOperator, fold the result or return null.
LLVM_ABI Valuellvm::simplifyUnOp (unsigned Opcode, Value *Op, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operand for a UnaryOperator, fold the result or return null.
LLVM_ABI Valuellvm::simplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS, const SimplifyQuery &Q)
 Given operands for a BinaryOperator, fold the result or return null.
LLVM_ABI Valuellvm::simplifyBinOp (unsigned Opcode, Value *LHS, Value *RHS, FastMathFlags FMF, const SimplifyQuery &Q)
 Given operands for a BinaryOperator, fold the result or return null.
LLVM_ABI Valuellvm::simplifyCall (CallBase *Call, Value *Callee, ArrayRef< Value * > Args, const SimplifyQuery &Q)
 Given a callsite, callee, and arguments, fold the result or return null.
LLVM_ABI Valuellvm::simplifyConstrainedFPCall (CallBase *Call, const SimplifyQuery &Q)
 Given a constrained FP intrinsic call, tries to compute its simplified version.
LLVM_ABI Valuellvm::simplifyFreezeInst (Value *Op, const SimplifyQuery &Q)
 Given an operand for a Freeze, see if we can fold the result.
LLVM_ABI Valuellvm::simplifyLoadInst (LoadInst *LI, Value *PtrOp, const SimplifyQuery &Q)
 Given a load instruction and its pointer operand, fold the result or return null.
LLVM_ABI Valuellvm::simplifyInstruction (Instruction *I, const SimplifyQuery &Q)
 See if we can compute a simplified version of this instruction.
LLVM_ABI Valuellvm::simplifyInstructionWithOperands (Instruction *I, ArrayRef< Value * > NewOps, const SimplifyQuery &Q)
 Like simplifyInstruction but the operands of I are replaced with NewOps.
LLVM_ABI Valuellvm::simplifyWithOpReplaced (Value *V, Value *Op, Value *RepOp, const SimplifyQuery &Q, bool AllowRefinement, SmallVectorImpl< Instruction * > *DropFlags=nullptr)
 See if V simplifies when its operand Op is replaced with RepOp.
LLVM_ABI bool llvm::replaceAndRecursivelySimplify (Instruction *I, Value *SimpleV, const TargetLibraryInfo *TLI=nullptr, const DominatorTree *DT=nullptr, AssumptionCache *AC=nullptr, SmallSetVector< Instruction *, 8 > *UnsimplifiedUsers=nullptr)
 Replace all uses of 'I' with 'SimpleV' and simplify the uses recursively.
LLVM_ABI const SimplifyQuery llvm::getBestSimplifyQuery (Pass &, Function &)
template<class T, class... TArgs>
const SimplifyQuery llvm::getBestSimplifyQuery (AnalysisManager< T, TArgs... > &, Function &)
LLVM_ABI const SimplifyQuery llvm::getBestSimplifyQuery (LoopStandardAnalysisResults &, const DataLayout &)