[llvm-commits] [poolalloc] r122298 - /poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

Arushi Aggarwal aggarwa4 at illinois.edu
Mon Dec 20 17:03:09 PST 2010


Author: aggarwa4
Date: Mon Dec 20 19:03:09 2010
New Revision: 122298

URL: http://llvm.org/viewvc/llvm-project?rev=122298&view=rev
Log:
A function might be visited multiple times, as we
are creating FuncInfo using the call graph now.
We must ensure, that we only count the args once.
Hence, if a function already has a funcInfo, we do
not modify it.

Modified:
    poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp

Modified: poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp?rev=122298&r1=122297&r2=122298&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/PoolAllocate.cpp Mon Dec 20 19:03:09 2010
@@ -845,6 +845,12 @@
   //
   for (unsigned index = 0; index < Functions.size(); ++index) {
     Function * F = (Function *) Functions[index];
+    if (FunctionInfo.find (F) != FunctionInfo.end()) {
+      FuncInfo & FI =  FunctionInfo.find(F)->second;
+      assert(FI.ArgNodes.size() == MarkedNodes.size());
+      continue;
+    }
+
     FuncInfo & FI =
             FunctionInfo.insert(std::make_pair(F, FuncInfo(*F))).first->second;
     //





More information about the llvm-commits mailing list