Hi Jakob,<br><br><div class="gmail_quote">On Thu, Oct 4, 2012 at 1:31 PM, Jakob Stoklund Olesen <span dir="ltr"><<a href="mailto:stoklund@2pi.dk" target="_blank">stoklund@2pi.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div class="im"><br><div><div>On Oct 4, 2012, at 2:47 AM, Madhusudan C.S <<a href="mailto:madhusudancs@gmail.com" target="_blank">madhusudancs@gmail.com</a>> wrote:</div><br><blockquote type="cite">

<div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

However, I was reading the DeveloperPolicy page and the policy for making major</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

changes asks the developers to discuss the work here before proceeding. So, I am</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

writing this mail to kickoff a discussion. I would really like to contribute to LLVM and</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

I think this is a good place for me to start. Is there something specific like a paper</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

that you guys would want me to read before diving in?</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

<br></div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

I understand that register allocation itself is a tricky problem and doing an interprocedural</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

allocation is extremely hard. But I would like to try, at least try and fail if worst comes</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

to worst than not doing anything at all. At least by attempting to implement that, I will</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

have a better understanding of LLVM code base which may come in handy to contribute</div><div style="font-family:Optima;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">

to other parts of LLVM.</div></blockquote></div><br></div><div>Interprocedural register allocation means different things to different people. The approach that is described on the open projects page is quite simple; it still runs the register allocator on one function at a time.</div>

<div><br></div><div>I am not aware of any papers describing this simple idea.</div><div><br></div><div>Basically, the PrologEpilogInsertion pass will add a bit mask to MachineModuleInfo describing which registers are clobbered by the function being compiled. Later, when compiling the callers, that bit mask is used to initialize the regmask operands on call instructions.</div>

</div></blockquote><div><br>So the idea is to sidestep from the calling convention a bit if we<br>already know that the called function will not be using all the<br>registers required by the convention and instead use those registers<br>

in the caller?<br><br>If I am understanding this correctly, is this something desirable for<br>LLVM, even if it is not high priority? Would you guys be Ok if I try<br>to implement this without disturbing the project priorities but with<br>

a little help/guidance? Something that interests me to get started<br>with LLVM.<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">

<div><br></div><div>See also TargetRegisterInfo::getCallPreservedMask().</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>/jakob</div><div><br></div></font></span></div></blockquote></div><br><br clear="all">

<br>-- <br>Thanks and regards,<br>  Madhusudan.C.S<br><br>