public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR49452, prevent post reload combining cross blockage insn
@ 2011-09-19  9:04 Carrot Wei
  2011-09-19 18:22 ` Jeff Law
  2011-09-19 21:11 ` Eric Botcazou
  0 siblings, 2 replies; 3+ messages in thread
From: Carrot Wei @ 2011-09-19  9:04 UTC (permalink / raw)
  To: gcc-patches

Hi

We should not combine insns cross volatile insns. Combine.c already does this
check, postreload should also do so.

Bootstrapped and regtested on x86_64-unknown-linux-gnu.
Regtested on arm qemu.

thanks
Carrot


ChangeLog:
2011-09-19  Wei Guozhi  <carrot@google.com>

        PR 49452
        * postreload.c (reload_combine): Invalidate use information when across
        volatile insn.


Index: postreload.c
===================================================================
--- postreload.c	(revision 178938)
+++ postreload.c	(working copy)
@@ -1312,7 +1312,8 @@ reload_combine (void)
 	 is and then later disable any optimization that would cross it.  */
       if (LABEL_P (insn))
 	last_label_ruid = reload_combine_ruid;
-      else if (BARRIER_P (insn))
+      else if (BARRIER_P (insn)
+	       || (INSN_P (insn) && volatile_insn_p (PATTERN (insn))))
 	for (r = 0; r < FIRST_PSEUDO_REGISTER; r++)
 	  if (! fixed_regs[r])
 	      reg_state[r].use_index = RELOAD_COMBINE_MAX_USES;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PR49452, prevent post reload combining cross blockage insn
  2011-09-19  9:04 [PATCH] PR49452, prevent post reload combining cross blockage insn Carrot Wei
@ 2011-09-19 18:22 ` Jeff Law
  2011-09-19 21:11 ` Eric Botcazou
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Law @ 2011-09-19 18:22 UTC (permalink / raw)
  To: Carrot Wei; +Cc: gcc-patches

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/19/11 02:51, Carrot Wei wrote:
> Hi
> 
> We should not combine insns cross volatile insns. Combine.c already
> does this check, postreload should also do so.
> 
> Bootstrapped and regtested on x86_64-unknown-linux-gnu. Regtested
> on arm qemu.
> 
> thanks Carrot
> 
> 
> ChangeLog: 2011-09-19  Wei Guozhi  <carrot@google.com>
> 
> PR 49452 * postreload.c (reload_combine): Invalidate use
> information when across volatile insn.
OK.
jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOd2iyAAoJEBRtltQi2kC7L0IH/0AlDgvNqYmH5MXASRmuqhVO
SI7CiO42lm0gbngNvQ0GpVUo1vlhHMnk7IhxBnHrenjCEg4wAceKHw5htfOlHHd1
d5zVi6H7mtn0YjNF+jEeLvpjV3rP7V9dc4Vx5axPM6w3O7TDJxbJerUvDDRCyZH0
Cg6lnFUUoeGs9u8ay2GJ/9QA863Fsx+1M6+M/L+oHxgiYYQEkRTN7vsUewr5zQkV
+P4tlOxXL/0pauHWafFC8Rfwft2KDcB1h7kET36rTnIZHMgn4zz+uru7s2u0l28Z
n/GpROGCVFLkmG1f1FKxWgruZbGxoSi65V0Ff82XgHvRf+agTPjYGm9hWdh7yx0=
=QbG0
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] PR49452, prevent post reload combining cross blockage insn
  2011-09-19  9:04 [PATCH] PR49452, prevent post reload combining cross blockage insn Carrot Wei
  2011-09-19 18:22 ` Jeff Law
@ 2011-09-19 21:11 ` Eric Botcazou
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Botcazou @ 2011-09-19 21:11 UTC (permalink / raw)
  To: Carrot Wei; +Cc: gcc-patches

> 2011-09-19  Wei Guozhi  <carrot@google.com>
>
>         PR 49452
>         * postreload.c (reload_combine): Invalidate use information when
> across volatile insn.

PR rtl-optimization/49452, otherwise I'm not sure the commit will be xref'ed.

-- 
Eric Botcazou

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-19 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-19  9:04 [PATCH] PR49452, prevent post reload combining cross blockage insn Carrot Wei
2011-09-19 18:22 ` Jeff Law
2011-09-19 21:11 ` Eric Botcazou

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).