<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54312>54312</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Missing support for GCC's attribute access (IR attributes with size index?)
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang:codegen
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
davidbolvansky
</td>
</tr>
</table>
<pre>
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 read_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?)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE1vozAQ_TVwsYKIyUdz4JCmm1UPe-mutMfI2AO4NTbrj6Tpr98xpCGptNJKCWBm_N6bN2MqI85l633vkmKb0D3-Gs6zRofM2AZXRiupQRjuxhBed6brjJ7tg-Ze4sPWeyur4MFlre9UQot_ZyT5U5JvL9dVzjgH50hCH8anWWcEJHRHLNQzqQW8J3QzZv9P6o44-QHTxlV-y3f41QK5wLBPRcT1wGUtwRHfMk8YqS-qiTfk1BoHpDrPkAQsaI4AtgkdaB_z4QaH9b2KKCMBjOHrNkFM9Qrcx7CxQuomwt9UkpFJ3fDiSkSkQ5w_QVpEYVqQLjhPKiBG478mtQmWaNZBbCFmMnHApp1Ha3BxstIPRg0P15jBTYgw8lromNSDqhPKskB642R0gamp4uxwa-dvIC07Anl-mVxwE_8g9V6OM6RDmyJNjfRoEJobCWO9jnATlIiFAXPnjDxjB8B2LtZ4mPp6iEgdO2PeCS574N2DjjfpfES_l4RGm36sBWV59gb3eMX-tizOSbLIX4UBi73zceDu4K4DOSbWLWt1THr6-e1LSMs3yWPoJTbMSRzX4pFwhnW12NMGNFim5Acbpg2rvJeNBQYHdVCDWREjKv2kGK-pKAuxKTYs9dIrKH9I56IBLvS9QfFx5_fdLqHr25GfjtI940n6djhBZDxBA10arPr6hcC8UGXcdLhQ6vh5m_XWxCHHJeoI0av9clHMadqWm1qwai7mS_6wqkQ1hxWr2FosBBUFgzVNFatAuTJZPiaUcsV0g3wcBwN9wjfJ8imVJc0pzYt8Q-c0ny8yCsvlOl_mNd0UeUVXaHocZJVFNfEDltpyEFaFxmFQ4Xy4KcjQrEYDDKSIz4JvjS0FO0pRGXVk2r2d06GUcqjjL75ywC8">