Linear expression of the form BasePtr + Index * Scale + Offset.

Synopsis

Declared in <llvm/Analysis/Loads.h>

struct LinearExpression;

Description

Index, Scale and Offset all have the same bit width, which matches the pointer index size of BasePtr. Index may be nullptr if Scale is 0.

Member Functions

Name

Description

LinearExpression [constructor]

Construct a zero‐scale, zero‐offset expression over BasePtr.

Data Members

Name

Description

BasePtr

Base pointer of the linear expression.

Flags

No‐wrap flags that apply to the linear addressing expression.

Index

Optional index multiplied by Scale; nullptr when Scale is 0.

Offset

Constant offset added to the scaled index.

Scale

Scale applied to Index.

Non-Member Functions

Name

Description

decomposeLinearExpression

Decompose a pointer into a linear expression. This may look through multiple GEPs.

Created with MrDocs