[PATCH] D157499: [IR] Add dead_on_unwind attribute

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 15 10:39:26 PDT 2023


efriedma added a comment.

I'm mostly concerned that depending on the size of the allocation leads to weird results if, for example, the caller decides to merge two allocas.  For example, you have a function `f(ptr dead_on_unwind, ptr)`, and the caller passes each argument a pointer to an `alloca i32`.  If the caller merge those two allocas into `{i32, i32}`, you'd expect the semantics to stay consistent... but if the whole allocation is "dead", then merging affects stores through the second pointer.  So using the "allocation" as the boundary isn't really well-defined.


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

https://reviews.llvm.org/D157499



More information about the llvm-commits mailing list