This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Earlyclobber misunderstanding in local-alloc.c?
- From: Ian Lance Taylor <iant at google dot com>
- To: Rask Ingemann Lambertsen <rask at sygehus dot dk>
- Cc: gcc at gcc dot gnu dot org
- Date: 19 Nov 2007 12:18:59 -0800
- Subject: Re: Earlyclobber misunderstanding in local-alloc.c?
- References: <20071117113904.GB17368@sygehus.dk>
Rask Ingemann Lambertsen <rask@sygehus.dk> writes:
> In local-alloc.c, block_alloc():
>
> if (optimize
> && recog_data.n_operands > 1
> && recog_data.constraints[0][0] == '='
> && recog_data.constraints[0][1] != '&')
> {
>
> The documentation about "Constraint Modifier Characters" says:
>
> "`&' applies only to the alternative in which it is written."
That code doesn't handle alternatives at all. It only looks at the
first alternative. It works that way because it is just checking
whether it can tie together a dying input register and an output
register.
The code is not optimal but it is not wrong. This is only a
heuristic, and it is probably adequate.
Ian