llvm::ConstantFolder

ConstantFolder - Create constants with minimum, target independent, folding.

Synopsis

Declared in <llvm/IR/ConstantFolder.h>

class ConstantFolder final
    : public IRBuilderFolder

Base Classes

NameDescription
IRBuilderFolderIRBuilderFolder - Interface for constant folding in IRBuilder.

Member Functions

NameDescription
ConstantFolder [constructor]Construct a folder that performs minimal target-independent constant folding.
CreatePointerBitCastOrAddrSpaceCast [virtual]Create a bitcast or addrspacecast of constant pointer C to DestTy.
CreatePointerCast [virtual]Create a pointer cast of constant C to type DestTy.
FoldBinOp [virtual]Fold a binary operator when both operands are constants.
FoldBinOpFMF [virtual]Fold a binary operator with fast-math flags when both operands are constants.
FoldCast [virtual]Fold a cast when the operand is a constant.
FoldCmp [virtual]Fold a compare when both operands are constants.
FoldExactBinOp [virtual]Fold an exact binary operator when both operands are constants.
FoldExtractElement [virtual]Fold an extractelement when the vector and index are constants.
FoldExtractValue [virtual]Fold an extractvalue when the aggregate operand is a constant.
FoldGEP [virtual]Fold a GEP when the pointer and all indices are constants.
FoldInsertElement [virtual]Fold an insertelement when the vector, element, and index are constants.
FoldInsertValue [virtual]Fold an insertvalue when the aggregate and inserted value are constants.
FoldIntrinsic [virtual]Attempt to fold an intrinsic call; always returns nullptr.
FoldNoWrapBinOp [virtual]Fold a no-wrap binary operator when both operands are constants.
FoldSelect [virtual]Fold a select when the condition and both arms are constants.
FoldShuffleVector [virtual]Fold a shufflevector when both vector operands are constants.
FoldUnOpFMF [virtual]Fold a unary operator with fast-math flags when the operand is a constant.