<div dir="ltr"><div>I'd like to suggest a different direction which should accomplish similar ends.<br></div><div><br></div><div>I think it would make sense to introduce an attribute: csecandidate.</div><div><br></div><div>If we see a call-site "X" marked as csecandidate, it would imply that it can be replaced with any other call-site "Y" with the same arguments which dominate the call-site at "X".</div><div><br></div><div>However, there are some cases that this would not be able to optimize.  For example, if we have two csecandidates ("X" and "Y") which do not dominate one another.  This is solvable using another attribute: speculatable.  This attribute would tell us that we can hoist the call out of arbitrary conditions.  This would allow us to move our csecandidate call-site to the common dominator of "X" and "Y" and RAUW.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 4, 2015 at 8:54 AM, Krzysztof Parzyszek via llvm-dev <span dir="ltr"><<a 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"><span class="">On 12/4/2015 10:48 AM, Vaivaswatha Nagaraj via llvm-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
This point however reminds me to add, functions that transitively call<br>
functions with HasInaccessibleState must also have the flag set.<br>
</blockquote>
<br></span>
That's in practice impossible to guarantee, both by the compiler and by the programmer.<br>
<br>
-Krzysztof<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</div></div></blockquote></div><br></div>