llvm::createSeparateConstOffsetFromGEPPass

Create a pass that splits GEPs into a base and constant offset.

Synopsis

Declared in <llvm/Transforms/Scalar.h>

FunctionPass*
createSeparateConstOffsetFromGEPPass(bool LowerGEP = false);

Description

Improves CSE by separating constant offsets from GEP address calculations.

Return Value

The newly created FunctionPass.

Parameters

NameDescription
LowerGEPIf true, also lower multi-index GEPs to single-index GEPs and extract struct-field offsets.