public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: tbsaunde+gcc@tbsaunde.org
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 3/4] always define HAVE_peephole2
Date: Fri, 21 Aug 2015 05:20:00 -0000	[thread overview]
Message-ID: <1440120076-1815-4-git-send-email-tbsaunde+gcc@tbsaunde.org> (raw)
In-Reply-To: <1440120076-1815-1-git-send-email-tbsaunde+gcc@tbsaunde.org>

From: tbsaunde <tbsaunde@138bc75d-0d04-0410-961f-82ee72b054a4>

gcc/ChangeLog:

2015-08-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* genconfig.c (main): Always define HAVE_cc0.
	* recog.c (rest_of_handle_peephole2): Adjust.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227051 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog   | 5 +++++
 gcc/genconfig.c | 5 +++++
 gcc/recog.c     | 8 +++-----
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5debcca..2943501 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
 2015-08-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* genconfig.c (main): Always define HAVE_cc0.
+	* recog.c (rest_of_handle_peephole2): Adjust.
+
+2015-08-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* reorg.c (relax_delay_slots): Don't use #if to check value of
 	HAVE_cc0.
 
diff --git a/gcc/genconfig.c b/gcc/genconfig.c
index acbf381..fc3c1eb 100644
--- a/gcc/genconfig.c
+++ b/gcc/genconfig.c
@@ -372,6 +372,11 @@ main (int argc, char **argv)
       printf ("#define HAVE_peephole2 1\n");
       printf ("#define MAX_INSNS_PER_PEEP2 %d\n", max_insns_per_peep2);
     }
+  else
+    {
+      printf ("#define HAVE_peephole2 0\n");
+      printf ("#define MAX_INSNS_PER_PEEP2 0\n");
+    }
 
   puts ("\n#endif /* GCC_INSN_CONFIG_H */");
 
diff --git a/gcc/recog.c b/gcc/recog.c
index c595bbd..352aec2 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3018,7 +3018,6 @@ split_all_insns_noflow (void)
   return 0;
 }
 \f
-#ifdef HAVE_peephole2
 struct peep2_insn_data
 {
   rtx_insn *insn;
@@ -3651,7 +3650,6 @@ peephole2_optimize (void)
   if (peep2_do_cleanup_cfg)
     cleanup_cfg (CLEANUP_CFG_CHANGED);
 }
-#endif /* HAVE_peephole2 */
 
 /* Common predicates for use with define_bypass.  */
 
@@ -3804,9 +3802,9 @@ if_test_bypass_p (rtx_insn *out_insn, rtx_insn *in_insn)
 static unsigned int
 rest_of_handle_peephole2 (void)
 {
-#ifdef HAVE_peephole2
-  peephole2_optimize ();
-#endif
+  if (HAVE_peephole2)
+    peephole2_optimize ();
+
   return 0;
 }
 
-- 
2.4.0

      parent reply	other threads:[~2015-08-21  1:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21  1:21 [PATCH 0/4] a little bit of ifdef removal tbsaunde+gcc
2015-08-21  1:21 ` [PATCH 1/4] always define HAVE_conditional_execution tbsaunde+gcc
2015-08-21  1:21 ` [PATCH 4/4] add default for CONSTANT_ALIGNMENT tbsaunde+gcc
2015-08-21  1:21 ` [PATCH 2/4] remove another #if for HAVE_cc0 tbsaunde+gcc
2015-08-21  5:20 ` tbsaunde+gcc [this message]

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=1440120076-1815-4-git-send-email-tbsaunde+gcc@tbsaunde.org \
    --to=tbsaunde+gcc@tbsaunde.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).