From 124534038a8df34d2c97a90bd9e668dcc2217988 Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Mon, 8 Aug 2016 19:22:19 +0000 Subject: [GPGPU] Support Values referenced from both isl expr and llvm instructions When adding code that avoids to pass values used in isl expressions and LLVM instructions twice, we forgot to make single variable passed to the kernel available in the ValueMap that makes it usable for instructions that are not replaced with isl ast expressions. This change adds the variable that is passed to the kernel to the ValueMap to ensure it is available for such use cases as well. llvm-svn: 278039 --- polly/lib/CodeGen/PPCGCodeGeneration.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'polly/lib/CodeGen/PPCGCodeGeneration.cpp') diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 9d851d1b967..eb9836f77ec 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -1213,6 +1213,8 @@ GPUNodeBuilder::createKernelFunctionDecl(ppcg_kernel *Kernel, for (long i = 0; i < NumVars; i++) { isl_id *Id = isl_space_get_dim_id(Kernel->space, isl_dim_param, i); Arg->setName(isl_id_get_name(Id)); + Value *Val = IDToValue[Id]; + ValueMap[Val] = &*Arg; IDToValue[Id] = &*Arg; KernelIDs.insert(std::unique_ptr(Id)); Arg++; -- cgit v1.2.3