ROSE
0.9.6a
|
IntraProcedurial DataFlow Analysis to compute exit and entry from all the function which. More...
#include <IntraProcAliasAnalysis.h>
Public Member Functions | |
IntraProcAliasAnalysis (SgNode *head, ClassHierarchyWrapper *_classHierarchy, CallGraphBuilder *_cgB, boost::unordered_map< SgFunctionDeclaration *, IntraProcAliasAnalysis * > &mapping, boost::unordered_map< SgExpression *, std::vector< SgFunctionDeclaration * > > &resolver) | |
CompReprPtr | getFunctionEntry () |
Get the Entry CompactRepresentation Graph for the function. More... | |
CompReprPtr | getFunctionExit () |
Get the Exit CompactRepresentation Graph for the function. More... | |
std::vector< AliasRelationNode > | getReturnStmts () |
Get the return statements. More... | |
void | setFunctionEntry (CompReprPtr &n) |
Set Function Entry CompactRepresentation. More... | |
void | setFunctionExit (CompReprPtr &n) |
Set Function Exit CompactRepresentation. More... | |
bool | runCheck () |
run and check whether any changes have been made More... | |
virtual void | run () |
Perform the intra procedural analysis. More... | |
void | init () |
Initialized the Analysis. More... | |
~IntraProcAliasAnalysis () | |
Destructor. More... | |
CompReprPtr | meet_data (const CompReprPtr &d1, const CompReprPtr &d2) |
Meet_data for intra procedural dataflow analysis. More... | |
virtual std::vector < SgGraphNode * > | getAllNodes () |
Get all the CFG Nodes. More... | |
virtual std::vector < SgGraphNode * > | getPredecessors (SgGraphNode *n) |
Get all the Predecessors of a CFG Node. More... | |
CompReprPtr | getCFGInData (SgGraphNode *a) |
Get the IN data of a CFG Node. More... | |
CompReprPtr | getCFGOutData (SgGraphNode *a) |
Get the OUT data of a CFG Node. More... | |
void | setCFGInData (SgGraphNode *a, CompReprPtr &b) |
Set the IN data of a CFG Node. More... | |
void | applyCFGTransferFunction (SgGraphNode *s) |
Apply the Transfer function to a node For an expression “pi = qj” OutC =TransferFunction(InC) = (InC – Must(Alias(p,i)) U (*a, b)where a ε Alias(p,i) and b ε Alias(q,j);. More... | |
![]() | |
IntraProcDataFlowAnalysis (SgNode *head) | |
Protected Member Functions | |
virtual void | buildCFG () |
Constructs the CFG. More... | |
void | getFunctionParametersAliasRelations (SgFunctionCallExp *f_exp, SgFunctionDeclaration *funcDecl, std::vector< std::pair< AliasRelationNode, AliasRelationNode > > &arg_relations, std::vector< std::pair< AliasRelationNode, AliasRelationNode > > &return_relations) |
Retrieve Alias Relations from Function Parameters. More... | |
void | getConstructorParametersAliasRelations (SgConstructorInitializer *f_exp, SgFunctionDeclaration *funcDecl, std::vector< std::pair< AliasRelationNode, AliasRelationNode > > &arg_relations) |
Retrieve Alias Relations from Constructor Parameters. More... | |
bool | addVirtualFunction (SgType *type, SgFunctionCallExp *funcExp) |
Given a callSite and type of object add appropriate virtual function declaration. More... | |
bool | updateVirtualFunctionInCallGraph (SgFunctionCallExp *funcCall, CompReprPtr &callSiteIN) |
Given a CallSite update with all the virtual function calls. More... | |
void | getAliases (CompReprPtr &ptr, AliasRelationNode &node, std::vector< SgVariableSymbol * > &aliases) |
Protected Attributes | |
StaticCFG::CustomFilteredCFG < AliasCfgFilter > * | cfg |
The CFG for the function. More... | |
CallGraphBuilder * | cgBuilder |
The Call Graph Builder for interation computatoin. More... | |
vector< SgGraphNode * > | cfgNodes |
List of all the CFGNodes in topological order. More... | |
CompReprPtr | entry |
Entry CompactRepresentation of the function. More... | |
CompReprPtr | exit |
Exit CompactRepresentation of the function. More... | |
unsigned long | checkPointHash |
boost::unordered_map < SgFunctionDeclaration *, IntraProcAliasAnalysis * > & | mapping |
A mapping to hold SgFunctionDeclaration to IntraProcAliasAnalysis. More... | |
boost::unordered_map < SgExpression *, std::vector < SgFunctionDeclaration * > > & | resolver |
A mapping to hold function resolve data. More... | |
![]() | |
SgNode * | head |
Private Attributes | |
AliasInfoGenerator * | gen |
AliasInfoGenerator to hold Alias Information. More... | |
ClassHierarchyWrapper * | classHierarchy |
Class Hierarchy Instance. More... | |
IntraProcedurial DataFlow Analysis to compute exit and entry from all the function which.
Definition at line 289 of file IntraProcAliasAnalysis.h.
IntraProcAliasAnalysis::IntraProcAliasAnalysis | ( | SgNode * | head, |
ClassHierarchyWrapper * | _classHierarchy, | ||
CallGraphBuilder * | _cgB, | ||
boost::unordered_map< SgFunctionDeclaration *, IntraProcAliasAnalysis * > & | mapping, | ||
boost::unordered_map< SgExpression *, std::vector< SgFunctionDeclaration * > > & | resolver | ||
) |
IntraProcAliasAnalysis::~IntraProcAliasAnalysis | ( | ) |
Destructor.
|
protectedvirtual |
Constructs the CFG.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
|
protected |
Retrieve Alias Relations from Function Parameters.
Map data between actual and formal parameters. Handles return values as well.
|
protected |
Retrieve Alias Relations from Constructor Parameters.
|
protected |
Given a callSite and type of object add appropriate virtual function declaration.
|
protected |
Given a CallSite update with all the virtual function calls.
|
protected |
|
inline |
Get the Entry CompactRepresentation Graph for the function.
Definition at line 354 of file IntraProcAliasAnalysis.h.
|
inline |
Get the Exit CompactRepresentation Graph for the function.
Definition at line 357 of file IntraProcAliasAnalysis.h.
|
inline |
Get the return statements.
Definition at line 360 of file IntraProcAliasAnalysis.h.
void IntraProcAliasAnalysis::setFunctionEntry | ( | CompReprPtr & | n) |
Set Function Entry CompactRepresentation.
void IntraProcAliasAnalysis::setFunctionExit | ( | CompReprPtr & | n) |
Set Function Exit CompactRepresentation.
bool IntraProcAliasAnalysis::runCheck | ( | ) |
run and check whether any changes have been made
|
virtual |
Perform the intra procedural analysis.
Reimplemented from IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
|
inline |
Initialized the Analysis.
Definition at line 375 of file IntraProcAliasAnalysis.h.
|
virtual |
Meet_data for intra procedural dataflow analysis.
This function is called when two path merges in CFG
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
|
inlinevirtual |
Get all the CFG Nodes.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
Definition at line 385 of file IntraProcAliasAnalysis.h.
|
virtual |
Get all the Predecessors of a CFG Node.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
|
inlinevirtual |
Get the IN data of a CFG Node.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
Definition at line 391 of file IntraProcAliasAnalysis.h.
|
inlinevirtual |
Get the OUT data of a CFG Node.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
Definition at line 394 of file IntraProcAliasAnalysis.h.
|
inlinevirtual |
Set the IN data of a CFG Node.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
Definition at line 397 of file IntraProcAliasAnalysis.h.
|
virtual |
Apply the Transfer function to a node For an expression “pi = qj” OutC =TransferFunction(InC) = (InC – Must(Alias(p,i)) U (*a, b)where a ε Alias(p,i) and b ε Alias(q,j);.
Implements IntraProcDataFlowAnalysis< SgGraphNode, CompReprPtr >.
|
private |
AliasInfoGenerator to hold Alias Information.
Definition at line 293 of file IntraProcAliasAnalysis.h.
|
private |
Class Hierarchy Instance.
Definition at line 296 of file IntraProcAliasAnalysis.h.
|
protected |
The CFG for the function.
Definition at line 300 of file IntraProcAliasAnalysis.h.
|
protected |
The Call Graph Builder for interation computatoin.
Definition at line 303 of file IntraProcAliasAnalysis.h.
|
protected |
List of all the CFGNodes in topological order.
Definition at line 306 of file IntraProcAliasAnalysis.h.
|
protected |
Entry CompactRepresentation of the function.
Definition at line 312 of file IntraProcAliasAnalysis.h.
|
protected |
Exit CompactRepresentation of the function.
Definition at line 315 of file IntraProcAliasAnalysis.h.
|
protected |
Definition at line 317 of file IntraProcAliasAnalysis.h.
|
protected |
A mapping to hold SgFunctionDeclaration to IntraProcAliasAnalysis.
Definition at line 323 of file IntraProcAliasAnalysis.h.
|
protected |
A mapping to hold function resolve data.
Definition at line 326 of file IntraProcAliasAnalysis.h.