[llvm] [IR] Only allow lifetime.start/end on allocas (PR #149310)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 17 11:16:09 PDT 2025
dtcxzyw wrote:
Generally, it makes sense to me. I also thought about this last year: https://github.com/dtcxzyw/llvm-tools/commit/c5ce24aab4a5336e33db8bdffecde451e87ad602
Unfortunately, the code reminds me that lifetime markers are also used on `sret` arguments:
https://github.com/dtcxzyw/llvm-opt-benchmark/blob/bd68fbece73af02012173822192d3b4ff72df08c/bench/minetest/original/guiButton.ll#L4478
BTW, does the order of lifetime markers matter? I mean the start-end sequence should look like a balanced bracket sequence. See also https://github.com/dtcxzyw/llvm-project/pull/2/files#diff-afb2b04eff951cb67d214bc6dfa62a087a72591451817dba7929b48c5fe635f9.
https://github.com/llvm/llvm-project/pull/149310
More information about the llvm-commits
mailing list