[PATCH] D98112: [LangRef] mention that the lifetime intrinsics' description in LangRef isn't everything

Juneyoung Lee via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 6 04:00:59 PST 2021


aqjune added inline comments.


================
Comment at: llvm/docs/LangRef.rst:18127
+the stack coloring algorithm cannot conclude that ``ptr`` is a stack-allocated
+object.
 
----------------
RalfJung wrote:
> Would this alternatively be captured by saying that if ptr is a stack-allocated object, then it *might* have the effect of the original `alloca` creating a dead object and this intrinsic making it live (but non-deterministically, not doing this and just replacing the content by poison is also allowed)?
It will help remove the mentioning of dependency on stack coloring's implementation, but due to practical reasons I think the current text is better.

It's because the current text reveals the problem of the status quo: alloca's lifetime depends on the stack coloring's implementation.
I think this mentioning will help people in the future raise questions about removal of this dependency, if lucky enough. Since this isn't a small problem, fully resolving this would require a dedicated team... I don't know.

Also, personally I prefer being simple here; nondeterminism is a hard concept and there's an opportunity that it can be interpreted differently by readers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98112/new/

https://reviews.llvm.org/D98112



More information about the llvm-commits mailing list