<div dir="ltr"><div>Hi</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 11:40 AM Priyanka Panigrahi via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>I have studied register allocation in theoretical aspects and exploring the same in the implementation level.<br></div><div><br></div><div>I need a minimal testcase for register spilling to analyze spilling procedure in llvm. I tried with a testcase taking 20 variables but all the 20 variables are getting stored in the stack using %rbp. Maybe my live variable analysis is wrong. Please help me with a minimal testcase to explore register spilling in llvm, <br></div></div></blockquote><div><br></div><div>You can share your testcase, people can have a look at it </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Is there any way to print the maximum live variables in source code. So that we can find out the minimum registers required for execution. Also, is it possible to print the register map of each variable in source code.<br></div></div></blockquote><div><br></div><div><b>-debug-only=regalloc </b>will dump a lot of information including live intervals and register maps.</div><div>Something like this.</div><div><pre style="color:rgb(0,0,0)">********** REWRITE VIRTUAL REGISTERS **********
********** Function: main
********** REGISTER MAP **********
[%0 -> $r12] GR64_with_sub_8bit
[%1 -> $r15] GR64_with_sub_8bit
[%9 -> $rsi] GR64_with_sub_8bit
[%10 -> $rdx] GR64_with_sub_8bit
[%14 -> $xmm1] FR32
[%17 -> $xmm1] FR32
[%20 -> $xmm1] FR32
[%27 -> $r15] GR64
[%35 -> $rdi] GR64
[%38 -> $xmm0] FR64
[%39 -> $xmm0] FR32
[%44 -> $xmm0] FR32
[%45 -> $xmm0] FR64
[%56 -> $rcx] GR64_with_sub_8bit
[%60 -> $rdi] GR64_with_sub_8bit
[%66 -> $rax] GR64_with_sub_8bit
[%73 -> $xmm0] FR32
[%74 -> $xmm0] FR64
[%82 -> $rbx] GR64_NOSP
[%83 -> $rbx] GR64_NOSP
[%87 -> $rdi] GR64_NOSP
[%88 -> $xmm0] FR32
[%90 -> $rbx] GR64_NOSP
[%91 -> $rbx] GR64_NOSP
[%93 -> $r14] GR64_with_sub_8bit</pre></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Any help would be appreciated.</div><div>Thank you in advance.<br></div><div><br></div><div>Regards,</div><div>Priyanka<br></div></div>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Regards,</div><div>DTharun</div></div></div></div></div></div></div></div></div>