Set dead_on_return attribute for indirect arguments

Set the dead_on_return attribute (added in LLVM 21) for arguments
that are passed indirectly, but not byval.

This indicates that the value of the argument on return does not
matter, enabling additional dead store elimination.
This commit is contained in:
Nikita Popov
2025-08-08 12:39:30 +02:00
parent 2886b36df4
commit ebef9d7f63
7 changed files with 55 additions and 6 deletions

View File

@@ -249,6 +249,7 @@ pub(crate) enum AttributeKind {
FnRetThunkExtern = 41,
Writable = 42,
DeadOnUnwind = 43,
DeadOnReturn = 44,
}
/// LLVMIntPredicate