From: Ian Lance Taylor <iant@google.com>
To: gcc-patches@gcc.gnu.org
Subject: PATCH COMMITTED: Discard emit_no_conflict_block clobber if register is decomposed
Date: Tue, 07 Aug 2007 16:49:00 -0000 [thread overview]
Message-ID: <m3fy2vnvd4.fsf@localhost.localdomain> (raw)
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;
reply other threads:[~2007-08-07 16:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3fy2vnvd4.fsf@localhost.localdomain \
--to=iant@google.com \
--cc=gcc-patches@gcc.gnu.org \
/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).