[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 23 12:19:43 PDT 2016
vitalybuka added a comment.
In https://reviews.llvm.org/D24693#550119, @ahatanak wrote:
> Thank you for the great example! I can now see this patch does fix mis-compiles.
> There are probably other lifetime bugs you'll see when the code being compiled includes gotos that jump past variable declarations, including the one here: http://lists.llvm.org/pipermail/cfe-dev/2016-July/050066.html. Do you think you can extend the approach taken in this patch to prevent mis-compiles for those too?
This probably can be extended to this case, but I'd prefer to do this in separate patch later.
> Also, rather than removing the intrinsics altogether, have you considered making changes to IRGen to insert them to different locations or insert extra lifetime.starts?
I can see how to insert starts, e.g. on every label which bypass declaration, but I am not sure where to put ends.
Probably it's possible, but patch will be significantly more complicated. I'd prefer to do so only when needed.
This is infrequent usecase, so it's probably not worth of additional complexity.
More information about the cfe-commits