llvm::InstSimplifyFolder::FoldGEP

Fold a GEP using InstructionSimplify.

Synopsis

Declared in <llvm/Analysis/InstSimplifyFolder.h>

virtual
Value*
FoldGEP(
    Type* Ty,
    Value* Ptr,
    ArrayRef<Value*> IdxList,
    GEPNoWrapFlags NW) const override;

Return Value

The simplified value, or nullptr if the operation cannot be folded.

Parameters

NameDescription
TyThe GEP source element type.
PtrThe base pointer value.
IdxListThe GEP index values.
NWNo-wrap flags for the GEP.