public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bernd Schmidt <bernds@codesourcery.com>
To: Jeff Law <law@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	 John David Anglin <dave@hiauly1.hia.nrc.ca>
Subject: Re: Emit more REG_EQUIV notes for function args (PR42235)
Date: Wed, 21 Jul 2010 22:53:00 -0000	[thread overview]
Message-ID: <4C477A1A.8040604@codesourcery.com> (raw)
In-Reply-To: <4C44827B.5070305@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 199 bytes --]

Here's a different patch, which I've committed as obvious after
bootstrapping and testing i686 and x64_64-linux.  It just restricts the
previous change to situations where it's clearly safe.


Bernd

[-- Attachment #2: parm-equiv-fix.diff --]
[-- Type: text/plain, Size: 1526 bytes --]

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 162390)
+++ ChangeLog	(working copy)
@@ -18,6 +18,10 @@
 	an old insn, ignore a use that occurs after store_ruid.
 	* Makefile.in (postreload.o): Update dependencies.
 
+	* function.c (record_hard_reg_sets): Restrict the previous change
+	to cases where the incoming nominal mode is the same as the
+	incoming promoted mode and everything happens in MODE_INT.
+
 2010-07-21  Jakub Jelinek  <jakub@redhat.com>
 
 	PR debug/45015
Index: function.c
===================================================================
--- function.c	(revision 162372)
+++ function.c	(working copy)
@@ -2918,7 +2918,10 @@ assign_parm_setup_reg (struct assign_par
 		     || promoted_nominal_mode != data->promoted_mode);
   moved = false;
 
-  if (need_conversion)
+  if (need_conversion
+      && GET_MODE_CLASS (data->nominal_mode) == MODE_INT
+      && data->nominal_mode == data->passed_mode
+      && data->nominal_mode == GET_MODE (data->entry_parm))
     {
       /* ENTRY_PARM has been converted to PROMOTED_MODE, its
 	 mode, by the caller.  We now have to convert it to
@@ -2979,8 +2982,9 @@ assign_parm_setup_reg (struct assign_par
 	  if (moved)
 	    {
 	      emit_insn (insns);
-	      equiv_stack_parm = gen_rtx_fmt_e (code, GET_MODE (parmreg),
-						equiv_stack_parm);
+	      if (equiv_stack_parm != NULL_RTX)
+		equiv_stack_parm = gen_rtx_fmt_e (code, GET_MODE (parmreg),
+						  equiv_stack_parm);
 	    }
 	}
     }

  parent reply	other threads:[~2010-07-21 22:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-14 11:14 Bernd Schmidt
2010-07-14 18:54 ` Jeff Law
2010-07-14 21:30   ` Bernd Schmidt
2010-07-14 22:28     ` Jeff Law
2010-07-15 17:14       ` Bernd Schmidt
2010-07-15 21:26         ` Jeff Law
2010-07-19  9:55         ` Bernd Schmidt
2010-07-19 16:51           ` Jeff Law
2010-07-19 16:53             ` Bernd Schmidt
2010-07-19 16:59               ` Richard Henderson
2010-07-19 17:09               ` Jeff Law
2010-07-19 19:06               ` John David Anglin
2010-07-21 22:53             ` Bernd Schmidt [this message]
2010-07-14 21:48   ` Bernd Schmidt
2010-07-14 22:22     ` Jeff Law

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=4C477A1A.8040604@codesourcery.com \
    --to=bernds@codesourcery.com \
    --cc=dave@hiauly1.hia.nrc.ca \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=law@redhat.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).