[llvm-commits] CVS: poolalloc/lib/PoolAllocate/PoolAllocate.cpp

Chris Lattner lattner at cs.uiuc.edu
Fri Nov 14 12:51:02 PST 2003


Changes in directory poolalloc/lib/PoolAllocate:

PoolAllocate.cpp updated: 1.52 -> 1.53

---
Log message:

Indirect call sites that only call external functions, they don't/can't pass extra
arguments.


---
Diffs of the changes:  (+3 -1)

Index: poolalloc/lib/PoolAllocate/PoolAllocate.cpp
diff -u poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.52 poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.53
--- poolalloc/lib/PoolAllocate/PoolAllocate.cpp:1.52	Fri Nov 14 10:41:39 2003
+++ poolalloc/lib/PoolAllocate/PoolAllocate.cpp	Fri Nov 14 12:50:08 2003
@@ -192,7 +192,9 @@
 const PA::EquivClassInfo &PoolAllocate::getECIForIndirectCallSite(CallSite CS) {
   Instruction *I = CS.getInstruction();
   assert(I && "Not a call site?");
-  assert(OneCalledFunction.count(I) && "No targets for indcall?");
+
+  if (!OneCalledFunction.count(I))
+    return ECInfoForLeadersMap[0];    // Special null function for empty graphs
   Function *Called = OneCalledFunction[I];
   Function *Leader = FuncECs.findClass(Called);
   assert(Leader && "Leader not found for indirect call target!");





More information about the llvm-commits mailing list