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 7/7] always define HAVE_peephole
Date: Thu, 21 May 2015 05:13:00 -0000	[thread overview]
Message-ID: <1432174178-29086-8-git-send-email-tbsaunde+gcc@tbsaunde.org> (raw)
In-Reply-To: <1432174178-29086-1-git-send-email-tbsaunde+gcc@tbsaunde.org>

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

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

	* final.c (final_scan_insn): Don't check HAVE_peephole with the
	preprocessor.
	* output.h: Likewise.
	* genconfig.c (main): Alwways define HAVE_peephole.
	* genpeep.c: Don't emit checks of HAVE_peephole.
---
 gcc/ChangeLog   | 8 ++++++++
 gcc/final.c     | 4 +---
 gcc/genconfig.c | 2 ++
 gcc/genpeep.c   | 2 --
 gcc/output.h    | 2 --
 5 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c20d608..f41c46e 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,13 @@
 2015-05-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* final.c (final_scan_insn): Don't check HAVE_peephole with the
+	preprocessor.
+	* output.h: Likewise.
+	* genconfig.c (main): Alwways define HAVE_peephole.
+	* genpeep.c: Don't emit checks of HAVE_peephole.
+
+2015-05-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* *.c, *.h: DOn't check HAVE_conditional_move with the preprocessor.
 
 2015-05-20  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
diff --git a/gcc/final.c b/gcc/final.c
index f0585ca..c8f059b 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2905,10 +2905,9 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 
 #endif
 
-#ifdef HAVE_peephole
 	/* Do machine-specific peephole optimizations if desired.  */
 
-	if (optimize_p && !flag_no_peephole && !nopeepholes)
+	if (HAVE_peephole && optimize_p && !flag_no_peephole && !nopeepholes)
 	  {
 	    rtx_insn *next = peephole (insn);
 	    /* When peepholing, if there were notes within the peephole,
@@ -2937,7 +2936,6 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
 	    /* PEEPHOLE might have changed this.  */
 	    body = PATTERN (insn);
 	  }
-#endif
 
 	/* Try to recognize the instruction.
 	   If successful, verify that the operands satisfy the
diff --git a/gcc/genconfig.c b/gcc/genconfig.c
index a3e5b31..7237dede 100644
--- a/gcc/genconfig.c
+++ b/gcc/genconfig.c
@@ -369,6 +369,8 @@ main (int argc, char **argv)
 
   if (have_peephole_flag)
     printf ("#define HAVE_peephole 1\n");
+  else
+    printf ("#define HAVE_peephole 0\n");
 
   if (have_peephole2_flag)
     {
diff --git a/gcc/genpeep.c b/gcc/genpeep.c
index 3ba930c..b914e85 100644
--- a/gcc/genpeep.c
+++ b/gcc/genpeep.c
@@ -389,7 +389,6 @@ from the machine description file `md'.  */\n\n");
   printf ("#include \"flags.h\"\n");
   printf ("#include \"tm-constrs.h\"\n\n");
 
-  printf ("#ifdef HAVE_peephole\n");
   printf ("extern rtx peep_operand[];\n\n");
   printf ("#define operands peep_operand\n\n");
 
@@ -423,7 +422,6 @@ from the machine description file `md'.  */\n\n");
     max_opno = 1;
 
   printf ("rtx peep_operand[%d];\n", max_opno + 1);
-  printf ("#endif\n");
 
   fflush (stdout);
   return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);
diff --git a/gcc/output.h b/gcc/output.h
index 81d2ad2..4ce6eea 100644
--- a/gcc/output.h
+++ b/gcc/output.h
@@ -289,9 +289,7 @@ extern void assemble_addr_to_section (rtx, section *);
 /* Return the size of the constant pool.  */
 extern int get_pool_size (void);
 
-#ifdef HAVE_peephole
 extern rtx_insn *peephole (rtx_insn *);
-#endif
 
 extern void output_shared_constant_pool (void);
 
-- 
2.4.0.78.g7c6ecbf

  parent reply	other threads:[~2015-05-21  2:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21  2:11 [PATCH 0/7] Some ifdef removal tbsaunde+gcc
2015-05-21  2:11 ` [PATCH 1/7] always define STACK_GROWS_DOWNWARD tbsaunde+gcc
2015-05-21 12:38   ` Jeff Law
2015-05-21 16:59   ` Joseph Myers
2015-05-21  2:11 ` [PATCH 3/7] move default for STACK_PUSH_CODE to defaults.h tbsaunde+gcc
2015-05-21 12:32   ` Jeff Law
2015-05-21  2:11 ` [PATCH 5/7] always define HAVE_conditional_move tbsaunde+gcc
2015-05-21 12:29   ` Jeff Law
2015-05-21  2:11 ` [PATCH 6/7] remove #if HAVE_conditional_move tbsaunde+gcc
2015-05-21 12:31   ` Jeff Law
2015-05-21  2:11 ` [PATCH 2/7] remove most ifdef STACK_GROWS_DOWNWARD tbsaunde+gcc
2015-05-21 12:33   ` Jeff Law
2015-05-21  5:13 ` tbsaunde+gcc [this message]
2015-05-21  6:17   ` [PATCH 7/7] always define HAVE_peephole Jeff Law
2015-05-21  5:35 ` [PATCH 4/7] don't compare ARG_FRAME_POINTER_REGNUM and FRAME_POINTER_REGNUM with the preprocessor tbsaunde+gcc
2015-05-21 12:28   ` Jeff Law

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=1432174178-29086-8-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).