public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Eric Botcazou <ebotcazou@libertysurf.fr>
Cc: gcc-patches@gcc.gnu.org, "Uros Bizjak" <ubizjak@gmail.com>,
	        zadeck@naturalbridge.com
Subject: Re: [PATCH, rtl-optimization]: Fix PR rtl-optimization/33638
Date: Tue, 09 Oct 2007 07:19:00 -0000	[thread overview]
Message-ID: <m3641goiw1.fsf@localhost.localdomain> (raw)
In-Reply-To: <200710090840.38213.ebotcazou@libertysurf.fr>

Eric Botcazou <ebotcazou@libertysurf.fr> writes:

> > There is special code in calls.c to mark the stack usage of const
> > functions: around line 2700, in expand_call.  It seems to me that if
> > store_one_arg comes up with a different address, because it calls
> > memory_address, you should put that address also in
> > CALL_INSN_FUNCTION_USAGE.  That ought to fix the immediate problem as
> > well.
> 
> Does dse.c take into account CALL_INSN_FUNCTION_USAGE at all?  Flow.c did.

It does.  The problem is that CALL_INSN_FUNCTION_USAGE has a mem with
virtual-outgoing-args, but the actual store is done via a reg.  The
address was copied into the reg due to -fforce-addr.  This can be seen
in the RTL which Uros posted.

dse.c is not smart enough to see that the address in the
CALL_INSN_FUNCTION_USAGE is the same as the address in the register.
This is an issue that only arises for const functions.

Ian

  reply	other threads:[~2007-10-09  7:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-08 12:14 Uros Bizjak
2007-10-08 12:35 ` [Bug rtl-optimization/33638] [4.3 regression]: wrong code with -fforce-addr Kenneth Zadeck
2007-10-09  6:01 ` [PATCH, rtl-optimization]: Fix PR rtl-optimization/33638 Ian Lance Taylor
2007-10-09  6:38   ` Eric Botcazou
2007-10-09  7:19     ` Ian Lance Taylor [this message]
2007-10-09 11:51       ` Kenneth Zadeck
2007-10-09 12:31         ` Uros Bizjak
2007-10-09 15:42           ` Ian Lance Taylor
2007-10-09 15:42         ` Ian Lance Taylor
2007-10-09 16:05           ` Kenneth Zadeck
2007-10-09 17:09             ` Ian Lance Taylor
2007-10-09 19:37       ` Eric Botcazou
2007-10-09 19:55         ` Kenneth Zadeck
2007-10-09 21:55           ` Eric Botcazou
2007-10-10 12:19             ` Eric Botcazou
2007-10-10 19:21               ` Eric Botcazou
2007-10-12 15:49                 ` Ian Lance Taylor
2007-10-12 17:10                   ` Eric Botcazou
2007-10-14 16:29                   ` Eric Botcazou
2007-10-15  5:47                     ` Ian Lance Taylor
2007-10-15  7:43                       ` Eric Botcazou
2007-10-10 10:45         ` Eric Botcazou

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=m3641goiw1.fsf@localhost.localdomain \
    --to=iant@google.com \
    --cc=ebotcazou@libertysurf.fr \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=ubizjak@gmail.com \
    --cc=zadeck@naturalbridge.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).