diff options
| author | Roman Gareev <gareevroman@gmail.com> | 2016-09-12 17:08:31 +0000 |
|---|---|---|
| committer | Roman Gareev <gareevroman@gmail.com> | 2016-09-12 17:08:31 +0000 |
| commit | f5aff70405ad56e7ec5fea0ef01cbc50a3f27bb1 (patch) | |
| tree | e51e029ed62088c0ab55168f8f69f78a79c52d45 /polly/lib/CodeGen/PPCGCodeGeneration.cpp | |
| parent | 5f4ca2f371d108d6df5ae88d7d8f4d206ae1fc7d (diff) | |
| download | bcm5719-llvm-f5aff70405ad56e7ec5fea0ef01cbc50a3f27bb1.tar.gz bcm5719-llvm-f5aff70405ad56e7ec5fea0ef01cbc50a3f27bb1.zip | |
Store the size of the outermost dimension in case of newly created arrays that require memory allocation.
We do not need the size of the outermost dimension in most cases, but if we
allocate memory for newly created arrays, that size is needed.
Reviewed-by: Michael Kruse <llvm@meinersbur.de>
Differential Revision: https://reviews.llvm.org/D23991
llvm-svn: 281234
Diffstat (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp')
| -rw-r--r-- | polly/lib/CodeGen/PPCGCodeGeneration.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 783d256a32c..654bf5bc1d2 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -1206,6 +1206,7 @@ GPUNodeBuilder::createKernelFunctionDecl(ppcg_kernel *Kernel, SmallVector<const SCEV *, 4> Sizes; isl_ast_build *Build = isl_ast_build_from_context(isl_set_copy(Prog->context)); + Sizes.push_back(nullptr); for (long j = 1; j < Kernel->array[i].array->n_index; j++) { isl_ast_expr *DimSize = isl_ast_build_expr_from_pw_aff( Build, isl_pw_aff_copy(Kernel->array[i].array->bound[j])); @@ -1315,6 +1316,7 @@ void GPUNodeBuilder::createKernelVariables(ppcg_kernel *Kernel, Function *FN) { Type *ArrayTy = EleTy; SmallVector<const SCEV *, 4> Sizes; + Sizes.push_back(nullptr); for (unsigned int j = 1; j < Var.array->n_index; ++j) { isl_val *Val = isl_vec_get_element_val(Var.size, j); long Bound = isl_val_get_num_si(Val); |

