SageInterface::isCanonicalForLoop¶
Check if a for-loop has a canonical form, return loop index, bounds, step, and body if requested
Synopsis¶
Declared in <SageIII/sageInterface/sageInterface.h>
[[visibility("default")]]
bool
isCanonicalForLoop(
SgNode* loop,
SgInitializedName** ivar = NULL,
SgExpression** lb = NULL,
SgExpression** ub = NULL,
SgExpression** step = NULL,
SgStatement** body = NULL,
bool* hasIncrementalIterationSpace = NULL,
bool* isInclusiveUpperBound = NULL); Description¶
A canonical form is defined as : one initialization statement, a test expression, and an increment expression , loop index variable should be of an integer type. IsInclusiveUpperBound is true when <= or >= is used for loop condition
Parameters¶
| Name | Description |
|---|---|
| loop | This class represents the base class for all IR nodes within Sage III. |
| ivar | This class represents the notion of a declared variable. |
| lb | This class represents the notion of an expression. Expressions |
| ub | This class represents the notion of an expression. Expressions |
| step | This class represents the notion of an expression. Expressions |
| body | This class represents the notion of a statement. |
Created with MrDocs