4 #include "DataflowCFG.h"
22 bool isNonMutatingOperator(
SgNode* n);
25 bool isNonMutatingSubTree(
SgNode* n);
43 std::string getFileInfoString(
SgNode* n);
45 std::string getFileInfoString(
CFGNode n);
77 void createTmpVarInit(
SgType* varType, std::string newName,
bool byReference,
101 typedef void (*CFGTransform)(
SgNode *target,
SgNode* newNode,
void* data);
105 typedef enum {insBef, insAft, callback} modType;
121 std::string str() {
return ""; }
124 class insertRequest:
public modRequest{
132 this->type = type_arg;
133 this->newNode = newNode;
134 this->origNode = origNode;
137 SgNode* getTgtNode() {
return origNode; }
143 class transformRequest:
public modRequest{
144 CFGTransform callbackFunc;
150 transformRequest(CFGTransform callbackFunc,
SgNode *&target,
SgNode* newNode,
void* data)
152 this->type = callback;
153 this->target = target;
154 this->newNode = newNode;
155 this->callbackFunc = callbackFunc;
164 std::list<modRequest*> requests;
170 void beginTransaction();
178 void transform(CFGTransform callbackFunc,
SgNode* n,
SgNode* newNode,
void* data);
183 void commitTransaction();
197 void prependToScopeStmt(
SgNode *target,
SgNode *newNode,
void* data);
200 void appendToScopeStmt(
SgNode *target,
SgNode *newNode,
void* data);
This class represents the base class for all types.
This class represents the location of the code associated with the IR node in the original source cod...
This class represents the notion of a declared variable.
This class represents the concept of a function declaration statement.
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.
This class represents strings within the IR nodes.
ROSE_DLL_API void replaceStatement(SgStatement *oldStmt, SgStatement *newStmt, bool movePreprocessinInfo=false)
Replace a statement with another. Move preprocessing information from oldStmt to newStmt if requested...
A node in the control flow graph.
This class represents the base class for all IR nodes within Sage III.
This class represents the concept of a variable name within the compiler (a shared container for the ...
This class represents the notion of a statement.
This class represents the variable refernece in expressions.
This class represents a source project, with a list of SgFile objects and global information about th...
This class represents the concept of a C or C++ variable declaration.