[llvm-commits] [poolalloc] r126822 - /poolalloc/trunk/lib/DSA/DSGraph.cpp
Arushi Aggarwal
aggarwa4 at illinois.edu
Tue Mar 1 18:23:35 PST 2011
Author: aggarwa4
Date: Tue Mar 1 20:23:35 2011
New Revision: 126822
URL: http://llvm.org/viewvc/llvm-project?rev=126822&view=rev
Log:
1. Filter if a call site passes less arguments than
required by a function.
2. When building call graph, look at all call sites,
not just the unresolved ones.
Modified:
poolalloc/trunk/lib/DSA/DSGraph.cpp
Modified: poolalloc/trunk/lib/DSA/DSGraph.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/DSGraph.cpp?rev=126822&r1=126821&r2=126822&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/DSGraph.cpp (original)
+++ poolalloc/trunk/lib/DSA/DSGraph.cpp Tue Mar 1 20:23:35 2011
@@ -49,6 +49,10 @@
cl::desc("Don't filter call sites based on calling convention."),
cl::Hidden,
cl::init(false));
+ static cl::opt<bool> noDSACallNumArgs("dsa-no-filter-numargs",
+ cl::desc("Don't filter call sites based on number of arguments."),
+ cl::Hidden,
+ cl::init(false));
static cl::opt<bool> noDSACallVA("dsa-no-filter-vararg",
cl::desc("Don't filter call sites based on vararg presense"),
cl::Hidden,
@@ -1611,6 +1615,12 @@
++Pi;
}
}
+
+ if (!noDSACallNumArgs) {
+ if(CS.arg_size() < F->arg_size()) {
+ return false;
+ }
+ }
//
// We've done all the checks we've cared to do. The function F can be called
@@ -1638,7 +1648,7 @@
//
// Get the list of unresolved call sites.
//
- const std::list<DSCallSite>& Calls = getAuxFunctionCalls();
+ const std::list<DSCallSite>& Calls = getFunctionCalls();
for (std::list<DSCallSite>::const_iterator ii = Calls.begin(),
ee = Calls.end();
ii != ee; ++ii) {
More information about the llvm-commits
mailing list