[LLVMdev] Removing the bigblock register allocator.
romix.llvm at googlemail.com
Wed Jul 29 22:31:32 PDT 2009
2009/7/30 Chris Lattner <clattner at apple.com>:
> On Jul 29, 2009, at 3:14 PM, Roman Levenstein wrote:
>> Hi Lang,
>> There are at least two projects that were using BigBlock, directly or
> Hi Roman,
> We have many plans to rip out linscan and replace it with something
> that handles large blocks better. That's not the issue :).
As far as I know, we have these ambitious plans since a while (just X
years), but there is no good replacement for a LLVM linear scan yet :)
The alternatives are either slower at compile time or generate slower code.
BTW, the research papers that I mentioned are not about improving
register allocation for large blocks (which was the target in the case
of BigBlock). They are about register allocation for general purpose
CFGs. And they report improvements (greatly reduced number of
load/stores for spills) over linear scan. The compilation time is also
comparable with linear scan. So, independent of the BigBlock
discussion they are worse looking at.
> The problem is that bigblock is unmaintained and bitrotted. Since noone
> is working on it, it doesn't work, and it is a maintenance burden, I
> think it should be removed.
I see the point and have no strong opinion here. Obviously, keeping
something unmaintained in the mainline just because it could be
potentially improved does not make too much sense. After all, if there
will be such an improvement of the BigBlock, it can be integrated back
into the mainline again.
>> One approach is described in the paper "Register Spilling and
>> Live-Range Splitting for SSA-Form Programs" by Matthias Braun and
>> Sebastian Hack.
>> It can be found here:
>> This approach uses an approach similar to the BigBlock allocator (i.e.
>> the MIN algorithm), but extends it from basic blocks to the whole CFG
>> of a function and does it at the SSA level. The implementation is
>> available as part of the libFirm project.
>> Another research project can be found here:
>> It seems to be based on LLVM's BigBlock and takes some inspiration
>> from the paper mentioned above.
>> In both cases, register allocators produce results that are quite
>> comparable or even significantly better than LLVM's linear scan
>> register allocator, in particular when it comes to the amount of
>> loads/stores introduced due to spilling. Braun/Hack allocator also
>> outperforms graph-coloring algorithms according to this metric.
>> Taking this into account, it seems that BigBlock can be extended into
>> something useful, if these researchers would contribute their code or
>> someone would extend BigBlock using their papers as a basis.
>> So, unless there is a really important reason to remove the BigBlock
>> register allocator, I'd suggest keeping it in the source tree.
>> Best regards,
>> 2009/7/29 Lang Hames <lhames at gmail.com>:
>>> Hi all,
>>> I'd like to kill off the bigblock register allocator. Is anyone
>>> still using it?
>>> LLVM Developers mailing list
>>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev