Greedy register allocation in LLVM 3.0
[Posted September 19, 2011 by corbet]
Readers interested in the grungy details of compilers may enjoy
this
LLVM project blog entry on their new register allocation algorithm.
"
The new basic allocator does away with linear scan's dependence on
visiting live ranges in linear order. Instead, it uses a priority queue to
visit live range in order of decreasing spill weight. The active list used
for interference checks is replaced with a set of live interval
unions. Implemented as a B+ tree per physical register, they are an
efficient way of checking for interference with already assigned live
ranges. Unlike the active list, live interval unions work with any priority
queue order."
(
Log in to post comments)