// Now that all of the equivalences have been built, merge the graphs for
// each equivalence class.
//
- DEBUG(std::cerr << "\nIndirect Function Equivalence Sets:\n");
+ DOUT << "\nIndirect Function Equivalence Sets:\n";
for (EquivalenceClasses<Function*>::iterator EQSI = FuncECs.begin(), E =
FuncECs.end(); EQSI != E; ++EQSI) {
if (!EQSI->isLeader()) continue;
Function* LF = *SI;
#ifndef NDEBUG
- DEBUG(std::cerr <<" Equivalence set for leader " << LF->getName() <<" = ");
+ DOUT <<" Equivalence set for leader " << LF->getName() <<" = ";
for (SN = SI; SN != FuncECs.member_end(); ++SN)
- DEBUG(std::cerr << " " << (*SN)->getName() << "," );
- DEBUG(std::cerr << "\n");
+ DOUT << " " << (*SN)->getName() << "," ;
+ DOUT << "\n";
#endif
// This equiv class has multiple functions: merge their graphs. First,
DEBUG(MergedG.AssertGraphOK());
}
}
- DEBUG(std::cerr << "\n");
+ DOUT << "\n";
}
if (It != ValMap.end() && It->first == &FG)
return It->second;
- DEBUG(std::cerr << " ProcessSCC for function " << FG.getFunctionNames()
- << "\n");
+ DOUT << " ProcessSCC for function " << FG.getFunctionNames() << "\n";
unsigned Min = NextID++, MyID = Min;
ValMap[&FG] = Min;
/// processGraph - Process the CBU graphs for the program in bottom-up order on
/// the SCC of the __ACTUAL__ call graph. This builds final folded CBU graphs.
void EquivClassGraphs::processGraph(DSGraph &G) {
- DEBUG(std::cerr << " ProcessGraph for function "
- << G.getFunctionNames() << "\n");
+ DOUT << " ProcessGraph for function " << G.getFunctionNames() << "\n";
hash_set<Instruction*> calls;
DSGraph::StripAllocaBit |
DSGraph::DontCloneCallNodes |
DSGraph::DontCloneAuxCallNodes);
- DEBUG(std::cerr << " Inlining graph [" << i << "/"
- << G.getFunctionCalls().size()-1
- << ":" << TNum << "/" << Num-1 << "] for "
- << CalleeFunc->getName() << "["
- << CalleeGraph->getGraphSize() << "+"
- << CalleeGraph->getAuxFunctionCalls().size()
- << "] into '" /*<< G.getFunctionNames()*/ << "' ["
- << G.getGraphSize() << "+" << G.getAuxFunctionCalls().size()
- << "]\n");
+ DOUT << " Inlining graph [" << i << "/"
+ << G.getFunctionCalls().size()-1
+ << ":" << TNum << "/" << Num-1 << "] for "
+ << CalleeFunc->getName() << "["
+ << CalleeGraph->getGraphSize() << "+"
+ << CalleeGraph->getAuxFunctionCalls().size()
+ << "] into '" /*<< G.getFunctionNames()*/ << "' ["
+ << G.getGraphSize() << "+" << G.getAuxFunctionCalls().size()
+ << "]\n";
}
}
E = MainSM.global_end(); I != E; ++I)
RC.getClonedNH(MainSM[*I]);
- DEBUG(std::cerr << " -- DONE ProcessGraph for function "
- << G.getFunctionNames() << "\n");
+ DOUT << " -- DONE ProcessGraph for function " << G.getFunctionNames() <<"\n";
}