-
Notifications
You must be signed in to change notification settings - Fork 14.8k
Description
https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
access (access-mode, ref-index)
access (access-mode, ref-index, size-index)
The access attribute specifies that a function to whose by-reference arguments the attribute applies accesses the referenced object according to access-mode. The access-mode argument is required and must be one of four names: read_only, read_write, write_only, or none. The remaining two are positional arguments.
We have IR attributes read_only and write_only, so mapping for these two modes could be easy. In terms of size-index, maybe we could extend existing IR attributes to optionally take size-index?
cc @jdoerfert (IR attributes)
cc @fhahn (DSE)
cc @nikic (Rust side; can this generalization of IR attributes be useful for Rust?)