return false;
}
-static void
-removeIdenticalCalls(std::vector<std::vector<DSNodeHandle> >& Calls,
- const string& where) {
+static void removeIdenticalCalls(std::vector<std::vector<DSNodeHandle> > &Calls,
+ const std::string &where) {
// Remove trivially identical function calls
unsigned NumFns = Calls.size();
std::sort(Calls.begin(), Calls.end());
Calls.end());
DEBUG(if (NumFns != Calls.size())
- std::cerr << "Merged " << (NumFns-Calls.size())
- << " call nodes in " << where << "\n";);
+ std::cerr << "Merged " << (NumFns-Calls.size())
+ << " call nodes in " << where << "\n";);
}
// removeTriviallyDeadNodes - After the graph has been constructed, this method
}
// remove trivially identical function calls
- removeIdenticalCalls(FunctionCalls, string("Globals Graph"));
+ removeIdenticalCalls(FunctionCalls, "Globals Graph");
}
return false;
}
+
// Find the callers of this function recorded during the BU pass
std::set<Function*> &PendingCallers = BUGraph.getPendingCallers();
- DEBUG(cerr << " [TD] Inlining callers for: " << F.getName() << "\n");
+ DEBUG(std::cerr << " [TD] Inlining callers for: " << F.getName() << "\n");
for (std::set<Function*>::iterator I=PendingCallers.begin(),
E=PendingCallers.end(); I != E; ++I) {
assert(! caller.isExternal() && "Externals unexpected in callers list");
DEBUG(std::cerr << "\t [TD] Inlining " << caller.getName()
- << " into callee: " << F.getName() << "\n");
+ << " into callee: " << F.getName() << "\n");
// These two maps keep track of where scalars in the old graph _used_
// to point to, and of new nodes matching nodes of the old graph.
//
DSGraph &callerGraph = calculateGraph(caller); // Graph to inline
- DEBUG(cerr << "\t\t[TD] Got graph for " << caller.getName() << " in: "
- << F.getName() << "\n");
+ DEBUG(std::cerr << "\t\t[TD] Got graph for " << caller.getName()
+ << " in: " << F.getName() << "\n");
// Clone the caller's graph into the current graph, keeping
// track of where scalars in the old graph _used_ to point...
/*&& FIXME: NEED TO CHECK IF ALL CALLERS FOUND!*/);
Graph->removeDeadNodes(/*KeepAllGlobals*/ false, /*KeepCalls*/ false);
- DEBUG(cerr << " [TD] Done inlining callers for: " << F.getName() << "\n");
+ DEBUG(std::cerr << " [TD] Done inlining callers for: "
+ << F.getName() << "\n");
return *Graph;
}