<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 23, 2016, at 2:59 PM, Quentin Colombet via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 23, 2016, at 2:44 PM, vivek pandya <<a href="mailto:vivekvpandya@gmail.com" class="">vivekvpandya@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><i class=""><font size="2" face="monospace, monospace" class=""><b class="">Vivek Pandya</b></font></i><div class=""><br class=""></div></div></div></div></div></div>
<br class=""><div class="gmail_quote">On Wed, Mar 23, 2016 at 10:18 PM, Quentin Colombet <span dir="ltr" class=""><<a href="mailto:qcolombet@apple.com" target="_blank" class="">qcolombet@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The pass manager already has support for calligraph connected region IIRC.<br class=""></blockquote><div class="">If I am not wrong Quentin and Mehdi Amini refers to CallGraphSCCPass.cpp </div></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Yes.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
As for the regmask part, we probably could hack something up in a week or so, but I believe this is not what Vivek had in mind.<br class="">
<br class=""></blockquote><div class="">Which operands should be kept in registers between function call should be justifying and for that we can take help from some research work ( some of I mentioned previously I have to read it again. Please suggest some more relevant papers  ) once that is implemented we can update the regmask for a call instruction to indicate which registers are free to be used. Am I going in correct direction ?</div></div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I do not know if there is a paper on this as this is quite trivial, but IIRC Open64 register allocator does that.</div><div class="">Anyhow, the algo is:</div><div class="">Given a call graph SCC</div><div class="">- Allocate the function with no calls or where each callee has been allocated</div><div class="">- Propagate the clobbered registers to the callers of that function by updating the related regmasks on the callsites.</div><div class="">Repeat until no more candidate.</div></div></div></div></blockquote><div><br class=""></div><div>Here is the patch that I believe achieve the first point.</div><div><br class=""></div><div></div></div></body></html>