[llvm] [IR] Add `dead_on_return` attribute (PR #143271)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 7 09:26:31 PDT 2025
================
@@ -818,7 +818,7 @@ bool llvm::isNoAliasCall(const Value *V) {
static bool isNoAliasOrByValArgument(const Value *V) {
if (const Argument *A = dyn_cast<Argument>(V))
- return A->hasNoAliasAttr() || A->hasByValAttr();
+ return A->hasNoAliasAttr() || A->hasByValAttr() || A->hasDeadOnReturnAttr();
----------------
dtcxzyw wrote:
Doesn't it imply that stores that would only be visible on the unwind path can also be elided?
If so, I don't think `dead_on_return` is a good name. It should be something that implies `dead_on_unwind`.
https://github.com/llvm/llvm-project/pull/143271
More information about the llvm-commits
mailing list