[llvm-commits] [poolalloc] r131513 - /poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Tue May 17 17:34:56 PDT 2011


Author: aggarwa4
Date: Tue May 17 19:34:56 2011
New Revision: 131513

URL: http://llvm.org/viewvc/llvm-project?rev=131513&view=rev
Log:
Change isIndirect. A call of a bitcasted function
is not an indirect call. This is the same logic
as used by Local, when visiting a CallSite. Fixes
PR9502.

Modified:
    poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp

Modified: poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp?rev=131513&r1=131512&r2=131513&view=diff
==============================================================================
--- poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp (original)
+++ poolalloc/trunk/lib/DSA/CompleteBottomUp.cpp Tue May 17 19:34:56 2011
@@ -120,8 +120,9 @@
     // Graph, but at least one of the functions in the SCC
     // should have an entry in the GlobalsGraph
 
-    bool isIndirect = ((*ii).getCalledFunction() == NULL);
-
+    Value *CalledValue = (*ii).getCalledValue()->stripPointerCasts();
+    
+    bool isIndirect = (!isa<Function>(CalledValue));
     if (isIndirect) {
       DSCallGraph::callee_iterator csii = callgraph.callee_begin(*ii),
                                    csee = callgraph.callee_end(*ii);





More information about the llvm-commits mailing list