[llvm-commits] [poolalloc] r104255 - in /poolalloc/trunk: ./ lib/PoolAllocate/TransformFunctionBody.cpp runtime/FL2Allocator/PoolAllocator.cpp

John Criswell criswell at uiuc.edu
Thu May 20 11:36:57 PDT 2010


Author: criswell
Date: Thu May 20 13:36:57 2010
New Revision: 104255

URL: http://llvm.org/viewvc/llvm-project?rev=104255&view=rev
Log:
Merged in the release_26 branch changes.

Modified:
    poolalloc/trunk/   (props changed)
    poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
    poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp

Propchange: poolalloc/trunk/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 20 13:36:57 2010
@@ -1 +1 @@
-/poolalloc/branches/release_26:97820-103512
+/poolalloc/branches/release_26:97820-104253

Modified: poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp?rev=104255&r1=104254&r2=104255&view=diff
==============================================================================
--- poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/trunk/lib/PoolAllocate/TransformFunctionBody.cpp Thu May 20 13:36:57 2010
@@ -588,13 +588,12 @@
       abort();
     } else if (CF->getName() == "pthread_create") {
       thread_creation_point = true;
-      //Get DSNode representing the void* passed to the callee
-	  DSNodeHandle passed_dsnode_handle = G->getNodeForValue(CS.getArgument(3));
 
       //Get DSNode representing the DSNode of the function pointer Value of the pthread_create call
       DSNode* thread_callee_node = G->getNodeForValue(CS.getArgument(2)).getNode();
       if(!thread_callee_node)
       {
+    	  assert(0 && "apparently you need this code");
     	  FuncInfo *CFI = PAInfo.getFuncInfo(*CF);
     	  thread_callee_node = G->getNodeForValue(CFI->MapValueToOriginal(CS.getArgument(2))).getNode();
       }
@@ -712,7 +711,7 @@
   }
 
   Function::const_arg_iterator FAI = CF->arg_begin(), E = CF->arg_end();
-  CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end();
+  CallSite::arg_iterator AI = CS.arg_begin() + (thread_creation_point ? 3 : 0), AE = CS.arg_end();
   for ( ; FAI != E && AI != AE; ++FAI, ++AI)
     if (!isa<Constant>(*AI))
       DSGraph::computeNodeMapping(CalleeGraph->getNodeForValue(FAI),

Modified: poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp?rev=104255&r1=104254&r2=104255&view=diff
==============================================================================
--- poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp (original)
+++ poolalloc/trunk/runtime/FL2Allocator/PoolAllocator.cpp Thu May 20 13:36:57 2010
@@ -914,6 +914,7 @@
 	dcArgPointer(callVM,arg[2+i]);
 	void* to_return = dcCallPointer(callVM,arg[0]);
 	dcFree(callVM);
+	free(arg_);
 	return to_return;
 }
 
@@ -921,7 +922,7 @@
 							 const pthread_attr_t* attr,
 							 void *(*start_routine)(void*), int num_pools, ...)
 {
-	void** arg_array = (void**)malloc(sizeof(void*)*(2+num_pools));
+	void** arg_array = (void**)malloc(sizeof(void*)*(3+num_pools));
 	arg_array[0] = (void*)start_routine;
 	arg_array[1] = (void*)num_pools;
 	va_list argpools;





More information about the llvm-commits mailing list