<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 6/20/16 11:29 PM, Mehdi Amini wrote:<br>
</div>
<blockquote
cite="mid:F055CBC2-C26F-4CF0-B4CE-84A9BF2092CC@apple.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=utf-8">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jun 20, 2016, at 11:12 AM, John Criswell via
llvm-dev <<a moz-do-not-send="true"
href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="moz-cite-prefix">On 6/20/16 9:39 AM, vivek
pandya via llvm-dev wrote:<br class="">
</div>
<blockquote
cite="mid:CAHYgpoJchoADK+FfzWfw3QcrEMOUawfyq9anKkiBTp0F7mkssw@mail.gmail.com"
type="cite" class="">
<div dir="ltr" class="">Dear Community,
<div class=""><br class="">
</div>
<div class="">To improve current interprocedural
register allocation (IPRA) , we have planned to set
callee saved registers to none for local functions,
currently I am doing it in following way:</div>
<div class=""><br class="">
</div>
<div class="">if (F->hasLocalLinkage() <span class=""> </span><span
class="">&& !F->hasAddressTaken()</span>)
{</div>
</div>
</blockquote>
<br class="">
<span class="">As an aside, you might want to analyze how
many functions have both local linkage and are not address
taken. I recall that many functions returned false for
hasAddressTaken() because some direct calls casted the
function to a different function type before calling it.
Such functions are still not address taken, but the simple
hasAddressTaken() method can't determine it.</span><br
class="">
</div>
</blockquote>
<div><br class="">
</div>
<div>Looks like hasAddressTaken could be updated to handle these
simple case maybe?</div>
</div>
</blockquote>
<br>
That might make sense if it has not been fixed already. Another
approach (if in-tree LLVM passes are frequently checking for
indirect calls) would be to write a simple analysis pass that lazily
computes the information on demand. That way, if multiple passes
are checking the same function repeatedly, it gets cached in the
analysis pass instead of being recomputed (so long as the analysis
pass is not invalidated by a transform). <br>
<br>
Regards,<br>
<br>
John Criswell<br>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
John Criswell
Assistant Professor
Department of Computer Science, University of Rochester
<a class="moz-txt-link-freetext" href="http://www.cs.rochester.edu/u/criswell">http://www.cs.rochester.edu/u/criswell</a></pre>
</body>
</html>