<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">What does it mean? Can it only touch memory that is directly referred to by an argument? Or if that argument points to another pointer, can we follow it?</div>
</div>
</div>
</blockquote>
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote"><br>
</div>
<div class="gmail_quote">Yes, idea is that we can’t follow pointer arguments to another pointers. In other words, all memory operations in the function can refer to memory only using pointers based on this function arguments.</div>
<div class="gmail_quote"><br>
</div>
</div>
</div>
</div>
<div>— Igor </div>
<br>
<div>
<div>On 19 Jun 2015, at 07:15, Nick Lewycky <<a href="mailto:nlewycky@google.com">nlewycky@google.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On 18 June 2015 at 10:58, Igor Laevsky<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:igor@azulsystems.com" target="_blank">igor@azulsystems.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
Hi,<br>
<br>
Currently in AliasAnalysis we can model ModRef behaviour for functions which<br>
only access memory through their pointer arguments. However we can't<br>
express this propery as a function attribute.<br>
<br>
For example, for intrinsics we can specify ReadWriteArgMem or ReadArgMem<br>
attributes in tablegen definitions. But due to the lack of the related function<br>
attributes on the llvm ir level, this intrinsics would be modelled as if they<br>
were clobbering arbitrary memory.<br>
<br>
It feels very naturall to add new function attribute which can cover such cases.<br>
<br>
I have a patch (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10398&d=AwMF-g&c=8hUWFZcy2Z-Za5rBPlktOQ&r=Mfk2qtn1LTDThVkh6-oGglNfMADXfJdty4_bhmuhMHA&m=bv50acuQmVvLiZknG4sAZf_yDp_nWQoKAi1PB5Vvd6s&s=s6fInmfCP0QwU0d33-qKUFUQvvnTrXsCE9DRVC_a6Io&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D10398</a>) in which I added this<br>
attribute. Currently there is some discussion on how to name it and how it should<br>
behave when defined together with other fucntion attributes.<br>
</blockquote>
<div><br>
</div>
<div>What does it mean? Can it only touch memory that is directly referred to by an argument? Or if that argument points to another pointer, can we follow it?</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
I wanted to get some feedback on this. Is this attribute required at all? Maybe<br>
there is already a way of expressing such things?<br>
</blockquote>
<div><br>
</div>
<div>The other way today is a custom AA pass. That can either use deduction, or special knowledge about named functions in your runtime.</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</body>
</html>