mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Ok, I'm tired of pulling out all my timers to check stuff in, just do it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10954 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5254a8dda8
commit
93ddd7ea10
@ -29,6 +29,15 @@ namespace {
|
||||
Statistic<> NumCallNodesMerged("dsnode", "Number of call nodes merged");
|
||||
};
|
||||
|
||||
#if 0
|
||||
#define TIME_REGION(VARNAME, DESC) \
|
||||
NamedRegionTimer VARNAME(DESC)
|
||||
#else
|
||||
#define TIME_REGION(VARNAME, DESC)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
using namespace DS;
|
||||
|
||||
DSNode *DSNodeHandle::HandleForwarding() const {
|
||||
@ -929,6 +938,7 @@ void DSGraph::updateFromGlobalGraph() {
|
||||
void DSGraph::cloneInto(const DSGraph &G, ScalarMapTy &OldValMap,
|
||||
ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap,
|
||||
unsigned CloneFlags) {
|
||||
TIME_REGION(X, "cloneInto");
|
||||
assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
|
||||
assert(&G != this && "Cannot clone graph into itself!");
|
||||
|
||||
@ -956,6 +966,8 @@ void DSGraph::cloneInto(const DSGraph &G, ScalarMapTy &OldValMap,
|
||||
for (unsigned i = FN, e = Nodes.size(); i != e; ++i)
|
||||
Nodes[i]->remapLinks(OldNodeMap);
|
||||
|
||||
{ TIME_REGION(X, "cloneInto:scalars");
|
||||
|
||||
// Copy the scalar map... merging all of the global nodes...
|
||||
for (ScalarMapTy::const_iterator I = G.ScalarMap.begin(),
|
||||
E = G.ScalarMap.end(); I != E; ++I) {
|
||||
@ -970,6 +982,7 @@ void DSGraph::cloneInto(const DSGraph &G, ScalarMapTy &OldValMap,
|
||||
InlinedGlobals.insert(GV);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!(CloneFlags & DontCloneCallNodes)) {
|
||||
// Copy the function calls list...
|
||||
@ -1017,6 +1030,7 @@ void DSGraph::clonePartiallyInto(const DSGraph &G, Function &F,
|
||||
NodeMapTy &OldNodeMap,
|
||||
unsigned CloneFlags) {
|
||||
|
||||
TIME_REGION(X, "clonePartiallyInto");
|
||||
assert(OldNodeMap.empty() && "Returned OldNodeMap should be empty!");
|
||||
assert(&G != this && "Cannot clone graph into itself!");
|
||||
|
||||
@ -1359,6 +1373,8 @@ static void removeIdenticalCalls(std::vector<DSCallSite> &Calls) {
|
||||
// we don't have to perform any non-trivial analysis here.
|
||||
//
|
||||
void DSGraph::removeTriviallyDeadNodes() {
|
||||
TIME_REGION(X, "removeTriviallyDeadNodes");
|
||||
|
||||
removeIdenticalCalls(FunctionCalls);
|
||||
removeIdenticalCalls(AuxFunctionCalls);
|
||||
|
||||
@ -1547,6 +1563,8 @@ void DSGraph::removeDeadNodes(unsigned Flags) {
|
||||
// merging...
|
||||
removeTriviallyDeadNodes();
|
||||
|
||||
TIME_REGION(X, "removeDeadNodes");
|
||||
|
||||
// FIXME: Merge non-trivially identical call nodes...
|
||||
|
||||
// Alive - a set that holds all nodes found to be reachable/alive.
|
||||
|
Loading…
Reference in New Issue
Block a user