[PATCH] D24693: [CodeGen] Don't emit lifetime intrinsics for some local variables
Vitaly Buka via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 26 22:13:19 PDT 2016
vitalybuka added a comment.
My assumption is that "start" makes access valid, and "end" makes access invalid, up to the next "start".
I see no problems problems with loops and multiple regions, as soon as access is happening between start and end. Loops always call "start" for nested alloca on each iteration and call "end" on iteration cleanup. For multiple starts I assume that variable is accessible right after the first start, and invalid after the first "end".
I see no cases other then this "goto" issues where clang behaves differently.
This patch addresses issues were the last intrinsic before access was "end":
call start, ... call end, ...access
or only the end: entry, ... call end, ... access
More information about the cfe-commits