[llvm-commits] [poolalloc] r104024 - in /poolalloc/branches/release_26: lib/PoolAllocate/TransformFunctionBody.cpp runtime/FL2Allocator/PoolAllocator.cpp
Patrick Simmons
simmon12 at illinois.edu
Tue May 18 09:42:58 PDT 2010
Author: psimmons
Date: Tue May 18 11:42:58 2010
New Revision: 104024
URL: http://llvm.org/viewvc/llvm-project?rev=104024&view=rev
Log:
bug fixes for experimental pool allocation thread support
Modified:
poolalloc/branches/release_26/lib/PoolAllocate/TransformFunctionBody.cpp
poolalloc/branches/release_26/runtime/FL2Allocator/PoolAllocator.cpp
Modified: poolalloc/branches/release_26/lib/PoolAllocate/TransformFunctionBody.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/release_26/lib/PoolAllocate/TransformFunctionBody.cpp?rev=104024&r1=104023&r2=104024&view=diff
==============================================================================
--- poolalloc/branches/release_26/lib/PoolAllocate/TransformFunctionBody.cpp (original)
+++ poolalloc/branches/release_26/lib/PoolAllocate/TransformFunctionBody.cpp Tue May 18 11:42:58 2010
@@ -586,13 +586,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();
}
@@ -710,7 +709,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/branches/release_26/runtime/FL2Allocator/PoolAllocator.cpp
URL: http://llvm.org/viewvc/llvm-project/poolalloc/branches/release_26/runtime/FL2Allocator/PoolAllocator.cpp?rev=104024&r1=104023&r2=104024&view=diff
==============================================================================
--- poolalloc/branches/release_26/runtime/FL2Allocator/PoolAllocator.cpp (original)
+++ poolalloc/branches/release_26/runtime/FL2Allocator/PoolAllocator.cpp Tue May 18 11:42:58 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