From: Jan Hubicka <jh@suse.cz>
To: Jason Merrill <jason_merrill@redhat.com>,
gcc-patches@gcc.gnu.org, rth@cygnus.com, aj@suse.de
Cc: Jan Hubicka <jh@suse.cz>, gcc@gcc.gnu.org
Subject: Re: spec2000 regression
Date: Wed, 15 Aug 2001 05:41:00 -0000 [thread overview]
Message-ID: <20010815144127.V19872@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <m366bpsi91.fsf@prospero.cambridge.redhat.com>
> >>>>> "Jan" == Jan Hubicka <jh@suse.cz> writes:
>
> > So remaining patch I can't analyze completely is yours to alias.c
> > I've failed to find the corresponding email at gcc-patches mailing list
> > (even when I believe I've went across it in the pass)
>
> The subject line is "PATCH to get_alias_set". There were two messages.
>
> > so please can you double-check the patch and try to explain me what
> > exactly it is shooting for?
>
> It's trying to avoid recalculating the alias set for a variable. I suppose
> it could cause a performance regression if the initial alias set were
> wrong, but I would expect that to cause other problems as well.
Hi,
the problem is that actually code first sets the DECL_RTL and then calls
set_mem_attributes, that calls get_alias_set, but it thinks that the alias set
is already computed, but it isn't.
I am now testing following patch. OK to install if it succeeds?
It fixes my testcase:
long *a;
short *b;
main()
{
*a = 1;
*b = 2;
return *a;
}
Now gets again:
pushl %ebp
movl %esp, %ebp
pushl %eax
pushl %eax
movl a, %eax
andl $-16, %esp
movl $1, (%eax)
movl b, %eax
movw $2, (%eax)
movl %ebp, %esp
movl $1, %eax
popl %ebp
ret
Honza
Wed Aug 15 14:38:26 CEST 2001 Jan Hubicka <jh@suse.cz>
* alias.c (get_alias_set): Check that the alias set is already
computed.
Index: alias.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/alias.c,v
retrieving revision 1.137
diff -c -3 -p -r1.137 alias.c
*** alias.c 2001/08/08 16:56:50 1.137
--- alias.c 2001/08/15 12:38:13
*************** get_alias_set (t)
*** 530,536 ****
return it. This is necessary for C++ anonymous unions, whose
component variables don't look like union members (boo!). */
if (TREE_CODE (t) == VAR_DECL
! && DECL_RTL_SET_P (t) && GET_CODE (DECL_RTL (t)) == MEM)
return MEM_ALIAS_SET (DECL_RTL (t));
/* Give the language another chance to do something special. */
--- 530,537 ----
return it. This is necessary for C++ anonymous unions, whose
component variables don't look like union members (boo!). */
if (TREE_CODE (t) == VAR_DECL
! && DECL_RTL_SET_P (t) && GET_CODE (DECL_RTL (t)) == MEM
! && MEM_ALIAS_SET (DECL_RTL (t)))
return MEM_ALIAS_SET (DECL_RTL (t));
/* Give the language another chance to do something special. */
next parent reply other threads:[~2001-08-15 5:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20010815123730.P19872@atrey.karlin.mff.cuni.cz>
[not found] ` <m366bpsi91.fsf@prospero.cambridge.redhat.com>
2001-08-15 5:41 ` Jan Hubicka [this message]
2001-08-15 6:18 ` Jason Merrill
2001-08-15 6:40 ` Joseph S. Myers
2001-08-15 7:36 ` Jan Hubicka
2001-08-15 7:44 ` Joseph S. Myers
2001-08-15 11:04 ` Andreas Jaeger
2001-08-15 7:56 ` Mark Mitchell
2001-08-15 5:57 Richard Kenner
2001-08-15 6:03 ` Jan Hubicka
2001-08-15 6:36 ` Jason Merrill
2001-08-15 6:52 ` Jan Hubicka
2001-08-15 7:11 ` Jason Merrill
2001-08-15 7:13 ` Jan Hubicka
2001-08-15 7:36 ` Jan Hubicka
2001-08-15 8:04 ` Mark Mitchell
2001-08-16 5:58 ` Jan Hubicka
2001-08-16 6:09 ` Jason Merrill
2001-08-16 7:40 ` Jan Hubicka
2001-08-16 7:46 ` Jason Merrill
2001-08-15 7:08 Richard Kenner
2001-08-15 7:10 ` Jan Hubicka
2001-08-15 11:28 Richard Kenner
2001-08-16 6:09 ` Jason Merrill
2001-08-22 7:53 ` Jason Merrill
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=20010815144127.V19872@atrey.karlin.mff.cuni.cz \
--to=jh@suse.cz \
--cc=aj@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=gcc@gcc.gnu.org \
--cc=jason_merrill@redhat.com \
--cc=rth@cygnus.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).