[llvm-commits] [poolalloc] r135603 - /poolalloc/trunk/lib/DSA/StdLibPass.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Wed Jul 20 12:13:42 PDT 2011
Author: aggarwa4
Date: Wed Jul 20 14:13:42 2011
New Revision: 135603
URL: http://llvm.org/viewvc/llvm-project?rev=135603&view=rev
Log:
We must recompute I flags after StdLib pass as
some DSNodes are no longer being used as
arguments and should not be marked I any more.
Modified:
poolalloc/trunk/lib/DSA/StdLibPass.cpp
Modified: poolalloc/trunk/lib/DSA/StdLibPass.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/StdLibPass.cpp?rev=135603&r1=135602&r2=135603&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/StdLibPass.cpp (original)
+++ poolalloc/trunk/lib/DSA/StdLibPass.cpp Wed Jul 20 14:13:42 2011
@@ -344,9 +344,14 @@
{"trackgetcwd", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"trackgetpwuid", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"trackgethostname", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"trackgethostbyname", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"trackgetservbyname", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"trackgetaddrinfo", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"trackgetsockname", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"trackaccept", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
{"trackpoll", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"trackpipe", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
+ {"trackReadLink", {NRET_NARGS, NRET_NARGS, NRET_NARGS, NRET_NARGS, false}},
#if 0
{"wait", {false, false, false, false, true, false, false, false, false}},
@@ -584,6 +589,8 @@
// functions as External because, at that point, they were. However, they no
// longer are necessarily External, and we need to update accordingly.
//
+ GlobalsGraph->maskIncompleteMarkers();
+
GlobalsGraph->computeExternalFlags(DSGraph::ResetExternal);
for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
if (!I->isDeclaration()) {
@@ -592,11 +599,25 @@
| DSGraph::ResetExternal
| DSGraph::DontMarkFormalsExternal
| DSGraph::ProcessCallSites;
+ G->maskIncompleteMarkers();
+ G->markIncompleteNodes(DSGraph::MarkFormalArgs
+ |DSGraph::IgnoreGlobals);
G->computeExternalFlags(EFlags);
DEBUG(G->AssertGraphOK());
}
+ GlobalsGraph->markIncompleteNodes(DSGraph::MarkFormalArgs
+ |DSGraph::IgnoreGlobals);
GlobalsGraph->computeExternalFlags(DSGraph::ProcessCallSites);
DEBUG(GlobalsGraph->AssertGraphOK());
+ for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I)
+ if (!I->isDeclaration()) {
+ DSGraph *Graph = getOrCreateGraph(I);
+ Graph->maskIncompleteMarkers();
+ cloneGlobalsInto(Graph, DSGraph::DontCloneCallNodes |
+ DSGraph::DontCloneAuxCallNodes);
+ Graph->markIncompleteNodes(DSGraph::MarkFormalArgs
+ |DSGraph::IgnoreGlobals);
+ }
return false;
}
More information about the llvm-commits
mailing list