Skip to content
Snippets Groups Projects
Commit fdd55415 authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

Temp Commit. GraphWriter is still not working

parent 4e18a23a
No related branches found
No related tags found
No related merge requests found
......@@ -434,8 +434,8 @@ struct DOTGraphTraits<DFGraph*> : public DefaultDOTGraphTraits {
};
void viewDFGraph(DFGraph *G) {
llvm::WriteGraph(G, "DataflowGrpah");
llvm::ViewGraph(G, "DataflowGraph");
//llvm::WriteGraph(G, "DataflowGrpah");
//llvm::ViewGraph(G, "DataflowGraph");
}
} // End llvm namespace
......
......@@ -130,28 +130,18 @@ namespace {
void BuildDFG::handleCreateEdge (DFInternalNode* N, IntrinsicInst* II) {
// The DFNode structures must be in the map before the edge is processed
HandleToDFNode::iterator DFI = HandleToDFNodeMap.find(II->getOperand(0));
errs() << "\n1";
assert(DFI != HandleToDFNodeMap.end());
errs() << " 2 ";
DFI = HandleToDFNodeMap.find(II->getOperand(1));
errs() << " 3 ";
assert(DFI != HandleToDFNodeMap.end());
errs() << " 4 ";
DFNode* SrcDF = HandleToDFNodeMap[II->getOperand(0)];
errs() << " 5 ";
DFNode* DestDF = HandleToDFNodeMap[II->getOperand(1)];
errs() << " 6 ";
Function* DFMapFunc = cast<Function>((II->getOperand(2))->stripPointerCasts());
errs() << " 7 ";
Function* ArgMapFunc = cast<Function>((II->getOperand(3))->stripPointerCasts());
errs() << " 8 ";
DFEdge* NewDFEdge = DFEdge::Create(SrcDF, DestDF, DFMapFunc, ArgMapFunc);
errs() << " 9 ";
// FIXME Need interface of DFNode for the following:
N->addEdgeToDFGraph(NewDFEdge);
errs() << " 10 ";
SrcDF->addSuccessor(DestDF);
errs() << " 11 ";
}
void BuildDFG::BuildGraph (DFInternalNode* N, Function *F) {
......
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