public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Leslie Zhai <lesliezhai@llvm.org.cn>
To: vmakarov@redhat.com, LewisR9@cf.ac.uk, dag@cray.com, stoklund@2pi.dk
Cc: GCC Development <gcc@gcc.gnu.org>,
	LLVM Developers Mailing List <llvm-dev@lists.llvm.org>
Subject: Register Allocation Graph Coloring algorithm and Others
Date: Fri, 15 Dec 2017 03:19:00 -0000	[thread overview]
Message-ID: <a679c6c3-fb97-3efe-130c-af307a79ea2e@llvm.org.cn> (raw)

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/



             reply	other threads:[~2017-12-15  3:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  3:19 Leslie Zhai [this message]
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
     [not found]           ` <5a3b03ec.01da9f0a.1934a.4b3bSMTPIN_ADDED_BROKEN@mx.google.com>
2017-12-21 11:09             ` [llvm-dev] " Bruce Hoult
2017-12-21 16:26               ` Leslie Zhai
     [not found] <615F0DCE4D5873A9@mac.com>
2017-12-19  0:07 ` Michael Clark
2017-12-19  2:10   ` Leslie Zhai
2017-12-19  4:16   ` Vladimir Makarov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a679c6c3-fb97-3efe-130c-af307a79ea2e@llvm.org.cn \
    --to=lesliezhai@llvm.org.cn \
    --cc=LewisR9@cf.ac.uk \
    --cc=dag@cray.com \
    --cc=gcc@gcc.gnu.org \
    --cc=llvm-dev@lists.llvm.org \
    --cc=stoklund@2pi.dk \
    --cc=vmakarov@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).