[llvm-dev] linear-scan RA

Matthias Braun via llvm-dev llvm-dev at lists.llvm.org
Mon Sep 10 09:57:37 PDT 2018


I would not describe LLVMs register allocator as linear scan, it's closer to graph coloring than linear scan IMO (though doesn't really matcher either approach).

RegAllocGreedy assigns the registers in an order based on the priority value computed in enqueu() we are not just scanning from top to bottom of the program. We also perform actual interference checks we just don't happen to build up an explicit interference graph up front.

- Matthias

> On Sep 10, 2018, at 9:49 AM, Preston Briggs via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> 
> Why have we ended up using linear-scan register allocation
> by default (instead of, e.g., coloring)?
> 
> Thanks,
> Preston
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://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/20180910/3cf75b3d/attachment.html>


More information about the llvm-dev mailing list