aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorAntonio Frighetto <me@antoniofrighetto.com>2025-07-18 10:59:42 +0200
committerAntonio Frighetto <me@antoniofrighetto.com>2025-07-18 11:50:18 +0200
commit9e0c06d708a40bb3c8bd08acd982836cce718135 (patch)
tree762c09774df448985d706cf9be7d9e6e37a82c44 /clang/lib/CodeGen/CodeGenModule.cpp
parentee8756e8551bc9ae5bf60e1ff16abaa95d61c234 (diff)
downloadllvm-9e0c06d708a40bb3c8bd08acd982836cce718135.zip
llvm-9e0c06d708a40bb3c8bd08acd982836cce718135.tar.gz
llvm-9e0c06d708a40bb3c8bd08acd982836cce718135.tar.bz2
[clang][CodeGen] Set `dead_on_return` when passing arguments indirectly
Let Clang emit `dead_on_return` attribute on pointer arguments that are passed indirectly, namely, large aggregates that the ABI mandates be passed by value; thus, the parameter is destroyed within the callee. Writes to such arguments are not observable by the caller after the callee returns. This should desirably enable further MemCpyOpt/DSE optimizations. Previous discussion: https://discourse.llvm.org/t/rfc-add-dead-on-return-attribute/86871.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions