<div dir="ltr">Sorry I forget to add clang mailing list.<div><br></div><div>-Vivek</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 15, 2016 at 11:57 PM, vivek pandya <span dir="ltr"><<a href="mailto:vivekvpandya@gmail.com" target="_blank">vivekvpandya@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Clang and LLVM Devs,</div><div><br></div><div>I have been working to add support for an attribute in clang and LLVM that helps</div><div>user to guide interprocedural register allocation. But the use case I am having</div><div>is very limited and thus I belieave it is good to have discussion on this before</div><div>sending a patch.</div><div><br></div><div>So for IPRA we have a situation where a function is calling a function which is</div><div>written in assembly and it is not defined in current module. IPRA's scope is</div><div>limited to a module so for such externally defined function it uses default</div><div>calling convention but here as the function is written in assembly user can</div><div>provide exact register usage detials. So we dicided to mark declration of such</div><div>function with __attribute__((regmask("clobbered list here"))) so LLVM can</div><div>construct regmask out of it and use it with IPRA to improve register allocation.</div><div><br></div><div>For this purpose I added support for this attribute in clang and clang codegen</div><div>this attribute as target dependent attribute and add to declaration. Then IPRA</div><div>constructs regmask from this and use during the optimization.</div><div><br></div><div>How ever after disussion on IRC with Joerg Sonnenberger and jroelofs we think</div><div>that this may effect other areas too. So it would be better to discuss this and</div><div>implement this as we all agree upon it.</div><div><br></div><div>Sincerely,</div><div>Vivek</div></div>
</blockquote></div><br></div>