diff options
| author | Tobias Grosser <tobias@grosser.es> | 2016-07-28 06:47:50 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2016-07-28 06:47:50 +0000 |
| commit | 4e18d71c71788654dd5c3e3b151ada8666b91029 (patch) | |
| tree | 8a7612983a32e943b1bae63f9c6dfe2753b3bc09 /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | 19d024b2fd930acad84fe6c33c2af93725408875 (diff) | |
| download | bcm5719-llvm-4e18d71c71788654dd5c3e3b151ada8666b91029.tar.gz bcm5719-llvm-4e18d71c71788654dd5c3e3b151ada8666b91029.zip | |
GPGPU: Generate kernel parameter allocation with right size
Before this change we miscounted the number of function parameters.
llvm-svn: 276960
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index d0ae82aec3c..20ab4999cf7 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -880,7 +880,8 @@ GPUNodeBuilder::getBlockSizes(ppcg_kernel *Kernel) { Value *GPUNodeBuilder::createLaunchParameters(ppcg_kernel *Kernel, Function *F) { - Type *ArrayTy = ArrayType::get(Builder.getInt8PtrTy(), F->getNumOperands()); + Type *ArrayTy = ArrayType::get(Builder.getInt8PtrTy(), + std::distance(F->arg_begin(), F->arg_end())); BasicBlock *EntryBlock = &Builder.GetInsertBlock()->getParent()->getEntryBlock(); |

