[all-commits] [llvm/llvm-project] 5b3776: [FunctionAttrs] Account for memory effects of inal...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Thu Oct 13 01:20:37 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5b3776842f8e14b70199c0f76773b2af1cf32d34
https://github.com/llvm/llvm-project/commit/5b3776842f8e14b70199c0f76773b2af1cf32d34
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-10-13 (Thu, 13 Oct 2022)
Changed paths:
M llvm/lib/Transforms/IPO/FunctionAttrs.cpp
M llvm/test/Transforms/FunctionAttrs/readattrs.ll
Log Message:
-----------
[FunctionAttrs] Account for memory effects of inalloca/preallocated
The code for inferring memory attributes on arguments claims that
inalloca/preallocated arguments are always clobbered:
https://github.com/llvm/llvm-project/blob/d71ad4108056d685f48407447095d8d92fd7685d/llvm/lib/Transforms/IPO/FunctionAttrs.cpp#L640-L642
However, we would still infer memory attributes for the whole
function without taking this into account, so we could still end
up inferring readnone for the function. This adds an argument
clobber if there are any inalloca/preallocated arguments.
Differential Revision: https://reviews.llvm.org/D135783
More information about the All-commits
mailing list