<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<div class="moz-cite-prefix">On 11/17/2017 01:49 AM, Hongbin Zheng
wrote:<br>
</div>
<blockquote
cite="mid:CAJ0ZJHQtgz=x6iMrqJor++HwmNFhqR-R0B7VaLw3p03U4bE=LA@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">Could you elaborate "<span style="font-size:12.8px">Note
that, without further analysis of the uses of the
potentially-noalias pointers, you can do this only ...</span>"?
<div>Why the uses, instead of the def, of pointer matter?</div>
</div>
</blockquote>
<br>
Both matter.<br>
<br>
static int foo(int *a, int *b) {<br>
return a[0] + b[1];<br>
}<br>
<br>
int bar(int *x) {<br>
return foo(x+1, x);<br>
}<br>
<br>
You can't mark a and b as noalias here, even though NoAlias(x+1, x)
== true. This is why I was saying that, unless the pointers come
from distinct, identified underlying objects, you need to look at
the uses of the pointers too.<br>
<br>
-Hal<br>
<br>
P.S. As discussed in D4609, we probably want to try adding CGSCC AA
wrappers, to look back through function arguments, instead of using
attribute propagation.<br>
<br>
<blockquote
cite="mid:CAJ0ZJHQtgz=x6iMrqJor++HwmNFhqR-R0B7VaLw3p03U4bE=LA@mail.gmail.com"
type="cite">
<div dir="ltr">
<div><br>
</div>
<div>Thanks</div>
<div>Hongbin</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Nov 16, 2017 at 11:21 PM, Hal
Finkel via llvm-dev <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,
Alexandre,<br>
<br>
We don't have anything currently which does this. Note that,
without further analysis of the uses of the
potentially-noalias pointers, you can do this only for
arguments with distinct (and identified) underlying objects
(i.e., you need something a bit stronger than just
"non-aliasing pointers").<br>
<br>
-Hal
<div class="HOEnZb">
<div class="h5"><br>
<br>
On 11/16/2017 10:11 AM, via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Is this what you are looking for?<br>
<br>
<a moz-do-not-send="true"
href="https://reviews.llvm.org/D4609"
rel="noreferrer" target="_blank">https://reviews.llvm.org/D4609</a><br>
<br>
Best,<br>
<br>
Haicheng Wu<br>
<br>
On 2017-11-14 20:34, Alexandre Isoard via llvm-dev
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
Do we have a pass that propagate the noalias
annotation down to the<br>
callee when:<br>
- it is static<br>
- it is always called with non aliasing pointers<br>
?<br>
<br>
Or maybe that is incorrect?<br>
<br>
-- <br>
<br>
ALEXANDRE ISOARD<br>
</blockquote>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org"
target="_blank">llvm-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote>
<br>
</div>
</div>
<span class="HOEnZb"><font color="#888888">
-- <br>
Hal Finkel<br>
Lead, Compiler Technology and Programming Languages<br>
Leadership Computing Facility<br>
Argonne National Laboratory</font></span>
<div class="HOEnZb">
<div class="h5"><br>
<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a moz-do-not-send="true"
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</body>
</html>