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

Name

Description

LowerGEP

If true, also lower multi‐index GEPs to single‐index GEPs and extract struct‐field offsets.

Created with MrDocs