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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits