[PATCH] D79454: [IR] `byval` arguments cause reads at call sites
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 5 17:17:23 PDT 2020
rnk accepted this revision.
rnk added a subscriber: aeubanks.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
IIUC, Attributor may infer that a function with `byval` args is `readnone`. This makes sense, the body may contain no loads. But a call instruction with a `byval` argument reads memory, even if the callee doesn't.
Does this actually matter, though? I would expect you could delete all the argument stores to the byval memory being passed in, and so long as the callee doesn't load from it, that's fine.
@aeubanks
Do we need equivalent handling for the `preallocated` and (soon to be removed) `inalloca` attributes? Maybe we don't, since I think we want to model `preallocated` functions as having side effects (adjusting SP).
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