Split a fixed‐size array access into subscript and size SCEVs.
Synopsis
Declared in <llvm/Analysis/Delinearization.h>
bool
delinearizeFixedSizeArray(
ScalarEvolution& SE,
SCEV const* Expr,
SmallVectorImpl<SCEV const*>& Subscripts,
SmallVectorImpl<SCEV const*>& Sizes,
SCEV const* ElementSize);
Description
Split this SCEVAddRecExpr into two vectors of SCEVs representing the subscripts and sizes of an access to a fixed size array. This is a special case of delinearization for fixed size arrays.
The delinearization is a 2 step process: the first step estimates the sizes of each dimension of the array. The second step computes the access functions for the delinearized array:
1. Compute the array size 2. Compute the access function: same as normal delinearization
Different from the normal delinearization, this function assumes that NO terms exist in the Expr. In other words, it assumes that the all step values are constant.
This function is intended to replace getIndexExpressionsFromGEP. They rely on the GEP source element type so that will be removed in the future.
Return Value
True if delinearization produced at least one subscript.
Parameters
Name |
Description |
SE |
Scalar evolution used to divide the access function. |
Expr |
Affine add‐rec access function to delinearize. |
Subscripts |
Filled with the access function of each dimension. |
Sizes |
Filled with the inferred size of each array dimension. |
ElementSize |
Size in bytes of one array element. |
Created with MrDocs