[LLVMdev] DSGraph::mergeInGraph usage?

Juan Nicolas Ruiz juanruiz at students.uiuc.edu
Sun Nov 24 20:35:00 PST 2002


I've been trying to merge DSGraphs from different Functions, but i'm
not going anywhere. For a Function F and DSGraph G, I tried this
(assumming no SCC in the callgraph):

vector<DSCallSite> CSV = G->getAuxFunctionCalls();

for (vector<DSCallSite>::iterator I = CSV.begin(), E = CSV.end();
     I != E; I++) {
  Value *V = I->getCallInst().getOperand(0);
  Function &SF = cast<Function>(*V);
  if (!SF.isExternal()) {
    DSGraph *SFG = new DSGraph(SF, GG);
    G->mergeInGraph(*I, *SFG, 0);
  }
}

but the resulting graph has no new merged DSNodes, even though in my
test case there is a DSNode pointed by the CallInst in F and another
DSNode in G that is returned to F.

Any ideas on what I'm doing wrong?

nicolas




More information about the llvm-dev mailing list