[PATCH] D79454: [IR] `byval` arguments cause reads at call sites
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 6 14:44:35 PDT 2020
efriedma added a comment.
> Now that I wrote this I am concerned we already have this problem without byval
If you do an inbounds GEP on a deallocated pointer, I think the "inbounds"-ness should apply to what the allocation looked like during its lifetime. (The only alternative is that gep effectively reads memory, and that's obviously a lot more problematic.)
> perhaps we really want the optimizer to just remove the byval attribute?
In general, we want the optimizer to remove the byval attribute; it's terrible for optimization and code generation. But removing it changes the calling convention, so we can only do it in limited circumstances.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79454/new/
https://reviews.llvm.org/D79454
More information about the llvm-commits
mailing list