ROSE
0.11.21.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
src
midend
programAnalysis
genericDataflow
arrIndexLabeler
arrIndexLabeler.h
1
#ifndef ARR_INDEX_LABELER_H
2
#define ARR_INDEX_LABELER_H
3
4
#include <sage3.h>
5
#include <list>
6
7
namespace
arrIndexLabeler
{
8
9
// labels the portion of the AST rooted at root with annotations that identify the various portions
10
// the read/write sides of SgAssignOp nodes (if they are)
11
void
addArrayIndexAnnotations(
SgNode
* root);
12
13
// returns true if the given node is part of an array index expression and false otherwise
14
bool
isArrayIndex(
SgNode
* n);
15
16
// returns true the given SgPntrArrRefExp node this is a top-level SgPntrArrRefExp that is not part
17
// of a larger SgPntrArrRefExp
18
// (i.e. given a[b[i][j]][k][l], it is either a[b[i][j]][k][l] or b[i][j])
19
bool
isTopArrayRefExp(
const
SgNode
* n);
20
21
// returns the SgExpression node that contains the name of the array in the given SgPntrArrRefExp or
22
// NULL if the node is not a SgPntrArrRefExp
23
SgExpression
* getArrayNameExp(
SgNode
* n);
24
25
// returns the dimensionality of the array reference in the given SgPntrArrRefExp
26
int
getArrayDim(
SgPntrArrRefExp
* n);
27
28
// returns the list of index expressionf in the given SgPntrArrRefExp
29
std::list<SgExpression*>& getArrayIndexExprs(
SgPntrArrRefExp
* n);
30
}
31
#endif
arrIndexLabeler
Definition:
arrIndexLabeler.h:7
SgExpression
This class represents the notion of an expression. Expressions are derived from SgLocatedNodes, since similar to statement, expressions have a concrete location within the user's source code.
Definition:
Cxx_Grammar.h:272721
SgNode
This class represents the base class for all IR nodes within Sage III.
Definition:
Cxx_Grammar.h:9451
SgPntrArrRefExp
Definition:
Cxx_Grammar.h:295169
Generated on Mon Feb 22 2021 05:38:36 for ROSE by
1.8.10