Skip to content
Snippets Groups Projects
Commit 0b914eea authored by kotsifa2's avatar kotsifa2
Browse files

Added functionality to BuildDFG Pass.

(functions required to access the DFGraph for other passes)
parent 5f734814
No related branches found
No related tags found
No related merge requests found
......@@ -24,11 +24,12 @@ namespace builddfg {
static char ID; // Pass identification, replacement for typeid
BuildDFG() : ModulePass(ID) {}
typedef ValueMap<Value*, DFNode*> HandleToDFNode;
typedef ValueMap<Value*, DFEdge*> HandleToDFEdge;
private:
// Member variables
DFInternalNode *Root;
typedef ValueMap<Value*, DFNode*> HandleToDFNode;
typedef ValueMap<Value*, DFEdge*> HandleToDFEdge;
HandleToDFNode HandleToDFNodeMap; // This map associates the i8* pointer
// with the DFNode structure that it
......@@ -49,6 +50,10 @@ namespace builddfg {
public:
virtual bool runOnModule(Module &M);
const DFInternalNode *getRoot();
const HandleToDFNode &getHandleToDFNodeMap();
const HandleToDFEdge &getHandleToDFEdgeMap();
};
} // End of namespace
......
......@@ -71,6 +71,17 @@ namespace builddfg {
return false; //TODO: What does returning "false" mean?
}
const DFInternalNode *BuildDFG::getRoot() {
return Root;
}
const BuildDFG::HandleToDFNode &BuildDFG::getHandleToDFNodeMap() {
return HandleToDFNodeMap;
}
const BuildDFG::HandleToDFEdge &BuildDFG::getHandleToDFEdgeMap() {
return HandleToDFEdgeMap;
}
// Returns true if instruction I is a visc launch intrinsic, false otherwise
bool BuildDFG::isViscLaunchIntrinsic(Instruction* I) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment