[llvm-dev] linear-scan RA (original) (raw)

David A. Greene via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 11 13:57:26 PDT 2018


Matthias Braun via llvm-dev <llvm-dev at lists.llvm.org> writes:

I don't want to go too deep into the discussion here; but I'd like to point out that in my experience the assignment of registers is less interesting/important than the problem of how to place your spill/reload code, where to perform live range splitting, how to accomodate your odd machine performance characteristics, ... The greedy allocator does a good job in giving you the flexibility to do what you need to.

That reflects my experience as well. Counting (static or dynamic) spills is definitely a poor way to judge an allocator. Counting copies may have more merit, but by far the most important aspect is spill code generation, what, where and how to spill.

I recently did a study varying Greedy allocation and spilling knobs and saw swings of 20% or more in performance. This is highly code-dependent of course but it just reinforced for me that there is no good "default" for anyone. Customers are always going to complain about "their" code and it's our job to patiently explain why what works for "their" code will be dreadful for "everyone else's" code.

And everyone is moving to Python anyway, so ¯_(ツ)_/¯ :)

                        -David


More information about the llvm-dev mailing list