Gathers the individual index expressions from a GEP instruction.

Synopsis

Declared in <llvm/Analysis/Delinearization.h>

bool
getIndexExpressionsFromGEP(
    ScalarEvolution& SE,
    GetElementPtrInst const* GEP,
    SmallVectorImpl<SCEV const*>& Subscripts,
    SmallVectorImpl<SCEV const*>& Sizes);

Description

This function optimistically assumes the GEP references into a fixed size array. If this is actually true, this function returns a list of array subscript expressions in Subscripts and a list of SCEV expressions describing the size of the individual array dimensions in Sizes. Both lists have either equal length or the size list is one element shorter in case there is no known size available for the outermost array dimension. Returns true if successful and false otherwise.

Return Value

True if at least one index expression was gathered; false otherwise.

Parameters

Name

Description

SE

Scalar evolution used to form index SCEVs.

GEP

GEP instruction whose indices are gathered.

Subscripts

Filled with a SCEV for each GEP index expression.

Sizes

Filled with a SCEV for each known inner array dimension size.

Created with MrDocs