<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Rohit,<div class=""><br class=""></div><div class="">The basic allocator splits live-ranges, but it does that in a very boring way.</div><div class="">Essentially, when you spill, you have to split the live-ranges and that’s what the inline spiller, used by the basic allocator, does.</div><div class=""><br class=""></div><div class="">E.g., let say you have:</div><div class="">a = …</div><div class="">...</div><div class="">= a</div><div class="">...</div><div class="">= a</div><div class=""><br class=""></div><div class="">And you want to spill a.</div><div class=""><br class=""></div><div class="">What the spiller will do is split a into its stored and reloaded components:</div><div class="">a0 = …</div><div class="">st a0</div><div class="">…</div><div class="">a1 = ld</div><div class="">= a1</div><div class="">…</div><div class="">a2 = ld</div><div class="">= a2</div><div class=""><br class=""></div><div class="">As you can see, the split created a0, a1, and a2 from a.</div><div class=""><br class=""></div><div class="">Now, if you’re interested in fancy live-range splitting, then yes, only the greedy allocator does that.</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">-Quentin</div><div class=""><br class=""></div><div class=""><div><blockquote type="cite" class=""><div class="">On Jan 13, 2022, at 1:23 AM, Rohit Aggarwal 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=""><div dir="ltr" class="">Hi All,<div class=""><br class=""></div><div class="">As per understanding, only the Greedy register allocator has the splitting heuristic which is  implemented using splitkit.cpp. The splitting logic is only present in splitkit.cpp file of llvm codebase.</div><div class="">Whereas one of the Basic register allocator's comments state that it also performs splitting but I am not able to find any use of api from splitkit.cpp for splitting.</div><div class=""><br class=""></div><div class="">Please clarify in which register allocator splitting heuristic is being used.</div><div class=""><br class=""></div><div class="">Thanks,</div><div class="">Rohit Aggarwal</div><div class=""><br class=""></div><div class=""><br class=""></div></div>

<br class="">
<span class=""><div style="line-height: 1.38; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size:11pt;font-family:Arial;color:rgb(34,34,34);vertical-align:baseline;white-space:pre-wrap;background-color:yellow" class="">Disclaimer:- </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small" class="">This </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small" class="">footer text is to convey that this email is sent by one of the </span><span style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-size:small" class="">users of IITH. So, do not mark it as SPAM.</span></div></span>_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a><br class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev<br class=""></div></blockquote></div><br class=""></div></body></html>