This is the mail archive of the
mailing list for the GCC project.
Re: A Question About LRA/reload
- From: Kugan <kugan dot vivekanandarajah at linaro dot org>
- To: lin zuojian <manjian2006 at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 09 Dec 2014 23:48:07 +1100
- Subject: Re: A Question About LRA/reload
- Authentication-results: sourceware.org; auth=none
- References: <20141209093747 dot GA25618 at ubuntu> <5486CA2E dot 1060006 at linaro dot org> <20141209101429 dot GB25618 at ubuntu>
On 09/12/14 21:14, lin zuojian wrote:
> Hi Kugan,
> I have read these pdfs. My question is LRA will change the insns, so
> why brother do the coloring so early. Changing the insns can
> generates new pseudo registers, so they needs to re-assign. Is that
IRA's job here is register allocation and LRA's job is matching the
constraints. For example, LRA might have to reload a value into a
different register class to match a constraint. To do that, LRA will
need a free register from certain register class. In order to get that
free register, LRA might have to change the IRA's allocation decision.
LRA needs the registrar allocation (that is the coloring info) and
spilled pseudo information to see if the constraints can be matched. It
iteratively have to change the insns till all the constraints are
matched. To get all the details you have to look at the code.