This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR63633: May middle-end come up width hard regs for insn expanders?
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>, GCC Development <gcc at gcc dot gnu dot org>
- Cc: Jeff Law <law at redhat dot com>, Jakub Jelinek <jakub at redhat dot com>, Denis Chertykov <chertykov at gmail dot com>, Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- Date: Mon, 20 Apr 2015 16:11:34 -0400
- Subject: Re: PR63633: May middle-end come up width hard regs for insn expanders?
- Authentication-results: sourceware.org; auth=none
- References: <544A5C14 dot 5030607 at gjlay dot de> <544A7CFA dot 700 at redhat dot com> <20141024162919 dot GL10376 at tucnak dot redhat dot com> <544A7EE5 dot 1040303 at redhat dot com> <544A984D dot 8080804 at gjlay dot de> <20141024182950 dot GQ10376 at tucnak dot redhat dot com> <5530D95F dot 3070603 at gjlay dot de>
On 17/04/15 05:58 AM, Georg-Johann Lay wrote:
I allowed me to CC Vladimir; maybe he can propose how the backend can
describe an efficient, constraint-based solution. The problem is
about expanders producing insns with non-fixed hard-regs as in/out
operands or clobbers. This includes move insn from non-generic
address spaces which require dedicated hard regs. Issue is about
correctness and efficiency of generated code.
I might be wrong but I think you have a bloated code because you use
scratches. I already told several times that usage of scratch is always
a bad idea. It was a bad idea for an old RA and is still a bad idea for
IRA. The usage of scratches should be prohibited, probably we should
write it somewhere. It is better to use just a regular pseudo instead.
Why it is a bad idea? Because IRA (or the old global RA) does not take
them into account *at all*. It means that IRA might think that there
are enough registers for pseudos but in reality it is wrong because of
scratches in live range of the pseudos.
If it is not the case I should investigate why you have a bloated code
and small test would help here.
Thanks, I hope my comments will be useful.