Rohit Aggarwal via llvm-dev
2022-Jan-13 09:23 UTC
[llvm-dev] Usage of splitting heuristic among LLVM register allocators
Hi All, 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. 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. Please clarify in which register allocator splitting heuristic is being used. Thanks, Rohit Aggarwal -- Disclaimer:- This footer text is to convey that this email is sent by one of the users of IITH. So, do not mark it as SPAM. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220113/dcb021d7/attachment.html>
Quentin Colombet via llvm-dev
2022-Jan-13 23:38 UTC
[llvm-dev] Usage of splitting heuristic among LLVM register allocators
Hi Rohit, The basic allocator splits live-ranges, but it does that in a very boring way. Essentially, when you spill, you have to split the live-ranges and that’s what the inline spiller, used by the basic allocator, does. E.g., let say you have: a = … ... = a ... = a And you want to spill a. What the spiller will do is split a into its stored and reloaded components: a0 = … st a0 … a1 = ld = a1 … a2 = ld = a2 As you can see, the split created a0, a1, and a2 from a. Now, if you’re interested in fancy live-range splitting, then yes, only the greedy allocator does that. Cheers, -Quentin> On Jan 13, 2022, at 1:23 AM, Rohit Aggarwal via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi All, > > 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. > 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. > > Please clarify in which register allocator splitting heuristic is being used. > > Thanks, > Rohit Aggarwal > > > > Disclaimer:- This footer text is to convey that this email is sent by one of the users of IITH. So, do not mark it as SPAM. > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20220113/f79cb78a/attachment.html>