IntraProcAliasAnalysis¶
IntraProcedurial DataFlow Analysis to compute exit and entry from all the function which
Synopsis¶
Declared in <src/midend/programAnalysis/VirtualFunctionAnalysis/IntraProcAliasAnalysis.h>
class IntraProcAliasAnalysis
: public IntraProcDataFlowAnalysis<SgGraphNode, CompReprPtr> Base Classes¶
| Name | Description |
|---|---|
IntraProcDataFlowAnalysis<SgGraphNode, CompReprPtr> |
Member Functions¶
| Name | Description |
|---|---|
IntraProcAliasAnalysisIntraProcAliasAnalysis( SgNode* head, ClassHierarchyWrapper* _classHierarchy, CallGraphBuilder* _cgB, std::unordered_map<SgFunctionDeclaration*, IntraProcAliasAnalysis*>& mapping, std::unordered_map<SgExpression*, std::vector<SgFunctionDeclaration*>>& resolver); [constructor] | |
~IntraProcAliasAnalysisvirtual ~IntraProcAliasAnalysis(); [destructor] [virtual] | Destructor |
applyCFGTransferFunctionvirtual void applyCFGTransferFunction(SgGraphNode* s); [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); |
getAllNodesvirtual std::vector<SgGraphNode*> getAllNodes(); [virtual] | Get all the CFG Nodes |
getCFGInDatavirtual CompReprPtr getCFGInData(SgGraphNode* a); [virtual] | Get the IN data of a CFG Node |
getCFGOutDatavirtual CompReprPtr getCFGOutData(SgGraphNode* a); [virtual] | Get the OUT data of a CFG Node |
getFunctionEntryCompReprPtr getFunctionEntry(); | Get the Entry CompactRepresentation Graph for the function |
getFunctionExitCompReprPtr getFunctionExit(); | Get the Exit CompactRepresentation Graph for the function |
getPredecessorsvirtual std::vector<SgGraphNode*> getPredecessors(SgGraphNode* n); [virtual] | Get all the Predecessors of a CFG Node |
getReturnStmtsstd::vector<AliasRelationNode> getReturnStmts(); | Get the return statements |
initvoid init(); | Initialized the Analysis |
meet_datavirtual CompReprPtr meet_data( CompReprPtr const& d1, CompReprPtr const& d2); [virtual] | Meet_data for intra procedural dataflow analysis. This function is called when two path merges in CFG |
runvirtual void run(); [virtual] | Perform the intra procedural analysis |
runCheckbool runCheck(); | run and check whether any changes have been made |
setCFGInDatavirtual void setCFGInData( SgGraphNode* a, CompReprPtr& b); [virtual] | Set the IN data of a CFG Node |
setFunctionEntryvoid setFunctionEntry(CompReprPtr& n); | Set Function Entry CompactRepresentation |
setFunctionExitvoid setFunctionExit(CompReprPtr& n); | Set Function Exit CompactRepresentation |
Protected Member Functions¶
| Name | Description |
|---|---|
addVirtualFunctionbool addVirtualFunction( SgType* type, SgFunctionCallExp* funcExp); | Given a callSite and type of object add appropriate virtual function declaration |
buildCFGvirtual void buildCFG(); [virtual] | Constructs the CFG |
getAliasesvoid getAliases( CompReprPtr& ptr, AliasRelationNode& node, std::vector<SgType*>& aliases); | |
getConstructorParametersAliasRelationsvoid getConstructorParametersAliasRelations( SgConstructorInitializer* f_exp, SgFunctionDeclaration* funcDecl, std::vector<std::pair<AliasRelationNode, AliasRelationNode>>& arg_relations); | Retrieve Alias Relations from Constructor Parameters. |
getFunctionParametersAliasRelationsvoid getFunctionParametersAliasRelations( SgFunctionCallExp* f_exp, SgFunctionDeclaration* funcDecl, std::vector<std::pair<AliasRelationNode, AliasRelationNode>>& arg_relations); | Retrieve Alias Relations from Function Parameters. Map data between actual and formal parameters. |
updateVirtualFunctionInCallGraphbool updateVirtualFunctionInCallGraph( SgFunctionCallExp* funcCall, CompReprPtr& callSiteIN); | Given a CallSite update with all the virtual function calls |
Protected Data Members¶
| Name | Description |
|---|---|
cfg | The CFG for the function |
cfgNodes | List of all the CFGNodes in topological order |
cgBuilder | The Call Graph Builder for interation computatoin |
exit | Exit CompactRepresentation of the function |
mapping | A mapping to hold SgFunctionDeclaration to IntraProcAliasAnalysis |
resolver | A mapping to hold function resolve data |
Private Data Members¶
| Name | Description |
|---|---|
classHierarchy | Class Hierarchy Instance |
gen | AliasInfoGenerator to hold Alias Information |
Created with MrDocs