public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Register Allocation Graph Coloring algorithm and Others
@ 2017-12-15  3:19 Leslie Zhai
  2017-12-15  4:40 ` Vladimir Makarov
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Leslie Zhai @ 2017-12-15  3:19 UTC (permalink / raw)
  To: vmakarov, LewisR9, dag, stoklund
  Cc: GCC Development, LLVM Developers Mailing List

Hi GCC and LLVM developers,

I am learning Register Allocation algorithms and I am clear that:

* Unlimited VirtReg (pseudo) -> limited or fixed or alias[1] PhysReg (hard)

* Memory (20 - 100 cycles) is expensive than Register (1 cycle), but it 
has to spill code when PhysReg is unavailable

* Folding spill code into instructions, handling register coallescing, 
splitting live ranges, doing rematerialization, doing shrink wrapping 
are harder than RegAlloc

* LRA and IRA is default Passes in RA for GCC:

$ /opt/gcc-git/bin/gcc hello.c
DEBUG: ../../gcc/lra.c, lra_init_once, line 2441
DEBUG: ../../gcc/ira-build.c, ira_build, line 3409

* Greedy is default Pass for LLVM

But I have some questions, please give me some hint, thanks a lot!

* IRA is regional register allocator performing graph coloring on a 
top-down traversal of nested regions, is it Global? compares with Local LRA

* The papers by Briggs and Chaiten contradict[2] themselves when examine 
the text of the paper vs. the pseudocode provided?

* Why  interference graph is expensive to build[3]?

And I am practicing[4] to use HEA, developed by Dr. Rhydian Lewis, for 
LLVM firstly.


[1] https://reviews.llvm.org/D39712

[2] http://lists.llvm.org/pipermail/llvm-dev/2008-March/012940.html

[3] https://github.com/joaotavio/llvm-register-allocator

[4] https://github.com/xiangzhai/llvm/tree/avr/include/llvm/CodeGen/GCol

-- 
Regards,
Leslie Zhai - https://reviews.llvm.org/p/xiangzhai/



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-12-21  0:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <615F0DCE4D5873A9@mac.com>
2017-12-19  0:07 ` Register Allocation Graph Coloring algorithm and Others Michael Clark
2017-12-19  2:10   ` Leslie Zhai
2017-12-19  4:16   ` Vladimir Makarov
2017-12-19 20:24     ` [llvm-dev] " Matthias Braun
2017-12-15  3:19 Leslie Zhai
2017-12-15  4:40 ` Vladimir Makarov
2017-12-15  4:59   ` Leslie Zhai
2017-12-15 14:48 ` Peter Bergner
2017-12-18 16:42 ` dag
2017-12-18 17:52   ` Leslie Zhai
2017-12-18 22:35     ` dag
     [not found]   ` <9CBFCADA170A6854@apple.com>
     [not found]     ` <6708A731-203E-4096-8137-85D4104DA035@apple.com>
2017-12-19  3:03       ` [llvm-dev] " Leslie Zhai
2017-12-20 17:25         ` Jakob Stoklund Olesen
2017-12-21  0:44           ` Leslie Zhai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).