<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 11/13/2014 05:02 PM, Chandler
Carruth wrote:<br>
</div>
<blockquote
cite="mid:CAGCO0KhsiOUfYtOrCiLCFgVshP3q6Xhe8LbNoMtgavHsmRtTDg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra"><br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"> This
intrinsic needs to carry control dependencies (it cannot
be hoisted out of a loop, for example) -- in this sense it
is very much like @llvm.assume. And like @llvm.assume,
we'll need to add logic to various passes to ignore it as
appropriate so that it does not block optimizations
unnecessarily.</blockquote>
</div>
<br>
We should do something to make this simpler. I think we should
have an intrinsic inst base class that assume, lifetime, and
other intrinsics which do not represent actual code in the
final program derive from so that we don't have to update
these lists all over the place. If we need 2 tiers to model
assume & noalias as distinct from the lifetime or other
intrinsics, fine. We should have high-level categories that
can be tested and updated.</div>
</div>
</blockquote>
Agreed.<br>
<br>
Specific to this point, I've seen a number of cases in discussion
recently where a notion of a intrinsic which is control dependent on
surrounding control flow, but does not read or write memory would be
useful. It really feels like that's what the current implementation
of llvm.assume has become and likely what this proposal would
require. Maybe it's time to introduce a notion of an arbitrary
non-memory control dependence?<br>
<br>
Cases that come to mind:<br>
- invariant.*<br>
- lifetime.*<br>
- float point state changes (this last one might need a stronger
restriction than the others)<br>
<br>
Philip<br>
</body>
</html>