<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 10/20/2017 12:36 AM, Daniel Berlin
via llvm-dev wrote:<br>
</div>
<blockquote
cite="mid:CAF4BwTWjEHAMrwoV4CFy3CfYUyFY05vUMARz1pN+ZsEqTwr0wg@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Thu, Oct 19, 2017 at 10:23 PM,
Mikael Holmén 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,<br>
<br>
Also, I think there is a bigger problem lurking than just
with norecurse.</blockquote>
<div>Yes</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> I think
that in general, functionattrs is not very good with
attributes when intrinsics are present.<br>
</blockquote>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
E.g.<br>
<a moz-do-not-send="true"
href="https://bugs.llvm.org/show_bug.cgi?id=34696"
rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug<wbr>.cgi?id=34696</a><br>
<br>
Here dbg.value prevents both norecurse and readnone from
being deduced.<br>
</blockquote>
<div><br>
</div>
<div>A lot of these are the more general issue of intrinsics
not being marked with proper memory attributes as a form
of attempted control dependence/optimization blocking/etc</div>
<div><br>
</div>
<div>Intrinsics.td even says this.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
So, it would be nice to fix this for norecurse, but it
would be even nicer to fix it for intrinsics and
attributes in general.<br>
</blockquote>
<div><br>
</div>
<div>Nobody as of yet has signed up to fix this, because it
often requires significant thinking about each intrinsic
and what really should be happening to it, modeling that,
and teaching optimizers to deal with it.</div>
<div><br>
</div>
<div>Instead the large hammer is chosen.</div>
<div><br>
</div>
<div>Eventually it'll matter enough to performance for
someone to do the work :)</div>
</div>
</div>
</div>
</blockquote>
<br>
I agree with this, but I also agree with Sanjoy: We should add a
NoRecurse property and mark intrinsics with it. This fits our
general scheme for intrinsics (i.e., "if we say nothing, we assume
the worst").<br>
<br>
The fact that we model all sorts of dependencies as memory
dependencies is also a problem, but a somewhat independent one.<br>
<br>
-Hal<br>
<br>
<blockquote
cite="mid:CAF4BwTWjEHAMrwoV4CFy3CfYUyFY05vUMARz1pN+ZsEqTwr0wg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div><br>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
</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>