From: Segher Boessenkool <segher@kernel.crashing.org>
To: gcc-patches@gcc.gnu.org
Cc: Segher Boessenkool <segher@kernel.crashing.org>
Subject: [PATCH] combine: More make_more_copies
Date: Sat, 10 Nov 2018 23:06:00 -0000 [thread overview]
Message-ID: <3086bff4510019762283300795d97e2f1c956aee.1541890736.git.segher@kernel.crashing.org> (raw)
This makes make_more_copies do what its documentation says, that is,
only make an intermediate pseudo if copying to a pseudo.
This regressed generated code quality when we didn't keep the original
notes that were on the copy, but since r265582 we do, and only allowing
pseudos now is a win. It also simplifies the code.
Committing.
Segher
2018-11-10 Segher Boessenkool <segher@kernel.crashing.org>
* combine.c (make_more_copies): Only make an intermediate copy if the
dest of a move is a pseudo.
---
gcc/combine.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/gcc/combine.c b/gcc/combine.c
index 77eeae7..c314206 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -14990,12 +14990,11 @@ make_more_copies (void)
rtx set = single_set (insn);
if (!set)
continue;
+
rtx dest = SET_DEST (set);
- if (dest == pc_rtx)
- continue;
- /* See PR87871. */
- if (dest == frame_pointer_rtx)
- continue;
+ if (!(REG_P (dest) && !HARD_REGISTER_P (dest)))
+ continue;
+
rtx src = SET_SRC (set);
if (!(REG_P (src) && HARD_REGISTER_P (src)))
continue;
--
1.8.3.1
reply other threads:[~2018-11-10 23:06 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=3086bff4510019762283300795d97e2f1c956aee.1541890736.git.segher@kernel.crashing.org \
--to=segher@kernel.crashing.org \
--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).