public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH COMMITTED: Discard emit_no_conflict_block clobber if register is decomposed
@ 2007-08-07 16:49 Ian Lance Taylor
  0 siblings, 0 replies; only message in thread
From: Ian Lance Taylor @ 2007-08-07 16:49 UTC (permalink / raw)
  To: gcc-patches

The function emit_no_conflict_block produces a clobber before the no
conflict sequence.  If lower-subreg decides that it can decompose the
target register, that clobber is unnecessary and in some cases
actually harmful.  This patch removes the clobber.

Bootstrapped and tested on i686-pc-linux-gnu.  Committed.

Ian


2007-08-07  Ian Lance Taylor  <iant@google.com>

	* lower-subreg.c (resolve_clobber): If the clobber has a LIBCALL
	note, just delete the insn.


Index: lower-subreg.c
===================================================================
--- lower-subreg.c	(revision 127272)
+++ lower-subreg.c	(working copy)
@@ -906,6 +906,15 @@ resolve_clobber (rtx pat, rtx insn)
   if (!resolve_reg_p (reg) && !resolve_subreg_p (reg))
     return false;
 
+  /* If this clobber has a REG_LIBCALL note, then it is the initial
+     clobber added by emit_no_conflict_block.  We were able to
+     decompose the register, so we no longer need the clobber.  */
+  if (find_reg_note (insn, REG_LIBCALL, NULL_RTX) != NULL_RTX)
+    {
+      delete_insn (insn);
+      return true;
+    }
+
   orig_mode = GET_MODE (reg);
   words = GET_MODE_SIZE (orig_mode);
   words = (words + UNITS_PER_WORD - 1) / UNITS_PER_WORD;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-08-07 16:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-07 16:49 PATCH COMMITTED: Discard emit_no_conflict_block clobber if register is decomposed Ian Lance Taylor

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