summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/PPCGCodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2016-08-09 07:22:08 +0000
committerTobias Grosser <tobias@grosser.es>2016-08-09 07:22:08 +0000
commitcf66ef26f3477860ed1727337089f6f2078ffc5c (patch)
tree543f25f4a271c2dc0fd922641d7ad5e9c6a43292 /polly/lib/CodeGen/PPCGCodeGeneration.cpp
parent31fd7fb5e651432a4b554527098dba1f65527150 (diff)
downloadbcm5719-llvm-cf66ef26f3477860ed1727337089f6f2078ffc5c.tar.gz
bcm5719-llvm-cf66ef26f3477860ed1727337089f6f2078ffc5c.zip
[GPGPU] Pass parameters always by using their own type
llvm-svn: 278100
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index eb9836f77ec..d351e802ab2 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -1161,8 +1161,12 @@ GPUNodeBuilder::createKernelFunctionDecl(ppcg_kernel *Kernel,
int NumVars = isl_space_dim(Kernel->space, isl_dim_param);
- for (long i = 0; i < NumVars; i++)
- Args.push_back(Builder.getInt64Ty());
+ for (long i = 0; i < NumVars; i++) {
+ isl_id *Id = isl_space_get_dim_id(Kernel->space, isl_dim_param, i);
+ Value *Val = IDToValue[Id];
+ isl_id_free(Id);
+ Args.push_back(Val->getType());
+ }
for (auto *V : SubtreeValues)
Args.push_back(V->getType());
OpenPOWER on IntegriCloud