This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: IRA has been merged into trunk
- From: "Andrew Pinski" <pinskia at gmail dot com>
- To: "Vladimir Makarov" <vmakarov at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 27 Aug 2008 13:16:31 -0700
- Subject: Re: IRA has been merged into trunk
- References: <48B3F9C5.5090904@redhat.com>
On Tue, Aug 26, 2008 at 5:40 AM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> Recently I got an approval of the last part of IRA -- reload
> changes. Therefore I've just merged IRA into mainline.
>
We produce now produce worse code for gcc.dg/20020103-1.c on powerpc64
with TOCs (and the stack space goes up, 256 vs 272).
Before IRA we emitted:
ld 3,.LC0@toc(2)
but after we had spill the address to the stack which is wrose:
--- before.s 2008-08-28 02:14:27.000000000 +0900
+++ after.s 2008-08-28 02:14:13.000000000 +0900
@@ -40,8 +40,9 @@ bar:
std 27,-40(1)
std 28,-32(1)
std 29,-24(1)
- stdu 1,-256(1)
+ stdu 1,-272(1)
lwzu 5,4(31)
+ std 9,112(1)
lwa 4,0(30)
lwa 3,0(9)
extsw 5,5
@@ -52,12 +53,13 @@ bar:
#asm
# 0 "" 2
#NO_APP
+ ld 9,112(1)
mr 4,30
- ld 3,.LC0@toc(2)
mr 5,31
+ mr 3,9
bl f2
nop
- addi 1,1,256
+ addi 1,1,272
ld 0,16(1)
ld 14,-144(1)
mtlr 0
Also if we are going to spill it to memory, then why use another
register and not just r3?
Note the comment on the testcase is incorrect:
/* Verify that constant equivalences get reloaded properly, either by being
spilled to the stack, or regenerated, but not dropped to memory. */
We do regnerate it so the check should not be done on lP64 Powerpc (or
any PowerOpen [TOC] based ABIs); I should mention that powerpc64 elf
has @got but xcoff does not have a @got which is why GCC uses the old
way of producing the TOC section.
Thanks,
Andrew Pinski