[llvm] [FunctionAttrs] Treat byval calls as only reading ptrs (PR #122618)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 13 06:57:42 PST 2025
nikic wrote:
> @nikic do you think it makes sense to update `CallBase::onlyReadsMemory` with a similar check, or should I keep things as is?
I'm a bit less sure on that one. `byval readonly` on a function definition does mean something, which is that the byval copy is not read by the function. But from an external perspective, when analyzing a call-site, this distinction is not relevant. So overall I think it would make sense to change `CallBase::onlyReadsMemory` as well. But maybe as a followup PR?
https://github.com/llvm/llvm-project/pull/122618
More information about the llvm-commits
mailing list