[PATCH] D50104: [OpenCL] Always emit alloca in entry block for enqueue_kernel builtin
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 2 10:00:52 PDT 2018
yaxunl added a comment.
In https://reviews.llvm.org/D50104#1185920, @scott.linder wrote:
> I still don't quite see what you describe; with that change all of the lifetime.end calls pile up just before the enclosing function returns, not after each call to enqueue_kernel. Looking at https://clang.llvm.org/doxygen/EHScopeStack_8h_source.html#l00078 I don't see any option which isn't based on scope. The lifetime.start calls do occur where I would expect, though, so I will update the patch.
Sorry my mistake. In this case, the full expressions seems to be the calling function, so using pushFullExprCleanup to emit lifetime.end does not work well here.
You need to call EmitLifetimeEnd explicitly after emitting the function call.
https://reviews.llvm.org/D50104
More information about the cfe-commits
mailing list