Skip to content
Commit 5b377684 authored by Nikita Popov's avatar Nikita Popov
Browse files

[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
parent f76e40d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment