LLVM 20.0.0git
Namespaces | Functions
ConstantFolding.h File Reference
#include <stdint.h>

Go to the source code of this file.

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::Intrinsic
 This namespace contains an enum with a value for every intrinsic/builtin function known by LLVM.
 

Functions

bool llvm::IsConstantOffsetFromGlobal (Constant *C, GlobalValue *&GV, APInt &Offset, const DataLayout &DL, DSOLocalEquivalent **DSOEquiv=nullptr)
 If this constant is a constant offset from a global, return the global and the constant.
 
Constantllvm::ConstantFoldInstruction (Instruction *I, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldInstruction - Try to constant fold the specified instruction.
 
Constantllvm::ConstantFoldConstant (const Constant *C, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr)
 ConstantFoldConstant - Fold the constant using the specified DataLayout.
 
Constantllvm::ConstantFoldInstOperands (Instruction *I, ArrayRef< Constant * > Ops, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr, bool AllowNonDeterministic=true)
 ConstantFoldInstOperands - Attempt to constant fold an instruction with the specified operands.
 
Constantllvm::ConstantFoldCompareInstOperands (unsigned Predicate, Constant *LHS, Constant *RHS, const DataLayout &DL, const TargetLibraryInfo *TLI=nullptr, const Instruction *I=nullptr)
 Attempt to constant fold a compare instruction (icmp/fcmp) with the specified operands.
 
Constantllvm::ConstantFoldUnaryOpOperand (unsigned Opcode, Constant *Op, const DataLayout &DL)
 Attempt to constant fold a unary operation with the specified operand.
 
Constantllvm::ConstantFoldBinaryOpOperands (unsigned Opcode, Constant *LHS, Constant *RHS, const DataLayout &DL)
 Attempt to constant fold a binary operation with the specified operands.
 
Constantllvm::ConstantFoldFPInstOperands (unsigned Opcode, Constant *LHS, Constant *RHS, const DataLayout &DL, const Instruction *I, bool AllowNonDeterministic=true)
 Attempt to constant fold a floating point binary operation with the specified operands, applying the denormal handling mod to the operands.
 
Constantllvm::FlushFPConstant (Constant *Operand, const Instruction *I, bool IsOutput)
 Attempt to flush float point constant according to denormal mode set in the instruction's parent function attributes.
 
Constantllvm::ConstantFoldSelectInstruction (Constant *Cond, Constant *V1, Constant *V2)
 Attempt to constant fold a select instruction with the specified operands.
 
Constantllvm::ConstantFoldCastOperand (unsigned Opcode, Constant *C, Type *DestTy, const DataLayout &DL)
 Attempt to constant fold a cast with the specified operand.
 
Constantllvm::ConstantFoldIntegerCast (Constant *C, Type *DestTy, bool IsSigned, const DataLayout &DL)
 Constant fold a zext, sext or trunc, depending on IsSigned and whether the DestTy is wider or narrower than C.
 
Constantllvm::ConstantFoldInsertValueInstruction (Constant *Agg, Constant *Val, ArrayRef< unsigned > Idxs)
 ConstantFoldInsertValueInstruction - Attempt to constant fold an insertvalue instruction with the specified operands and indices.
 
Constantllvm::ConstantFoldExtractValueInstruction (Constant *Agg, ArrayRef< unsigned > Idxs)
 Attempt to constant fold an extractvalue instruction with the specified operands and indices.
 
Constantllvm::ConstantFoldInsertElementInstruction (Constant *Val, Constant *Elt, Constant *Idx)
 Attempt to constant fold an insertelement instruction with the specified operands and indices.
 
Constantllvm::ConstantFoldExtractElementInstruction (Constant *Val, Constant *Idx)
 Attempt to constant fold an extractelement instruction with the specified operands and indices.
 
Constantllvm::ConstantFoldShuffleVectorInstruction (Constant *V1, Constant *V2, ArrayRef< int > Mask)
 Attempt to constant fold a shufflevector instruction with the specified operands and mask.
 
Constantllvm::ConstantFoldLoadFromConst (Constant *C, Type *Ty, const APInt &Offset, const DataLayout &DL)
 Extract value of C at the given Offset reinterpreted as Ty.
 
Constantllvm::ConstantFoldLoadFromConst (Constant *C, Type *Ty, const DataLayout &DL)
 Extract value of C reinterpreted as Ty.
 
Constantllvm::ConstantFoldLoadFromConstPtr (Constant *C, Type *Ty, APInt Offset, const DataLayout &DL)
 Return the value that a load from C with offset Offset would produce if it is constant and determinable.
 
Constantllvm::ConstantFoldLoadFromConstPtr (Constant *C, Type *Ty, const DataLayout &DL)
 Return the value that a load from C would produce if it is constant and determinable.
 
Constantllvm::ConstantFoldLoadFromUniformValue (Constant *C, Type *Ty, const DataLayout &DL)
 If C is a uniform value where all bits are the same (either all zero, all ones, all undef or all poison), return the corresponding uniform value in the new type.
 
bool llvm::canConstantFoldCallTo (const CallBase *Call, const Function *F)
 canConstantFoldCallTo - Return true if its even possible to fold a call to the specified function.
 
Constantllvm::ConstantFoldCall (const CallBase *Call, Function *F, ArrayRef< Constant * > Operands, const TargetLibraryInfo *TLI=nullptr, bool AllowNonDeterministic=true)
 ConstantFoldCall - Attempt to constant fold a call to the specified function with the specified arguments, returning null if unsuccessful.
 
Constantllvm::ConstantFoldBinaryIntrinsic (Intrinsic::ID ID, Constant *LHS, Constant *RHS, Type *Ty, Instruction *FMFSource)
 
Constantllvm::ConstantFoldLoadThroughBitcast (Constant *C, Type *DestTy, const DataLayout &DL)
 ConstantFoldLoadThroughBitcast - try to cast constant to destination type returning null if unsuccessful.
 
bool llvm::isMathLibCallNoop (const CallBase *Call, const TargetLibraryInfo *TLI)
 Check whether the given call has no side-effects.
 
Constantllvm::ReadByteArrayFromGlobal (const GlobalVariable *GV, uint64_t Offset)