always define HAVE_peephole

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.

From-SVN: r223519
This commit is contained in:
Trevor Saunders 2015-05-22 01:04:24 +00:00 committed by Trevor Saunders
parent 692e031294
commit d87834de87
5 changed files with 11 additions and 7 deletions

View File

@ -1,3 +1,11 @@
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> 2015-05-20 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* combine.c, expmed.c, expr.c, optabs.c optabs.h, toplev.c: DOn't * combine.c, expmed.c, expr.c, optabs.c optabs.h, toplev.c: DOn't

View File

@ -2905,10 +2905,9 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
#endif #endif
#ifdef HAVE_peephole
/* Do machine-specific peephole optimizations if desired. */ /* 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); rtx_insn *next = peephole (insn);
/* When peepholing, if there were notes within the peephole, /* 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. */ /* PEEPHOLE might have changed this. */
body = PATTERN (insn); body = PATTERN (insn);
} }
#endif
/* Try to recognize the instruction. /* Try to recognize the instruction.
If successful, verify that the operands satisfy the If successful, verify that the operands satisfy the

View File

@ -369,6 +369,8 @@ main (int argc, char **argv)
if (have_peephole_flag) if (have_peephole_flag)
printf ("#define HAVE_peephole 1\n"); printf ("#define HAVE_peephole 1\n");
else
printf ("#define HAVE_peephole 0\n");
if (have_peephole2_flag) if (have_peephole2_flag)
{ {

View File

@ -389,7 +389,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"flags.h\"\n"); printf ("#include \"flags.h\"\n");
printf ("#include \"tm-constrs.h\"\n\n"); printf ("#include \"tm-constrs.h\"\n\n");
printf ("#ifdef HAVE_peephole\n");
printf ("extern rtx peep_operand[];\n\n"); printf ("extern rtx peep_operand[];\n\n");
printf ("#define operands 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; max_opno = 1;
printf ("rtx peep_operand[%d];\n", max_opno + 1); printf ("rtx peep_operand[%d];\n", max_opno + 1);
printf ("#endif\n");
fflush (stdout); fflush (stdout);
return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE); return (ferror (stdout) != 0 ? FATAL_EXIT_CODE : SUCCESS_EXIT_CODE);

View File

@ -289,9 +289,7 @@ extern void assemble_addr_to_section (rtx, section *);
/* Return the size of the constant pool. */ /* Return the size of the constant pool. */
extern int get_pool_size (void); extern int get_pool_size (void);
#ifdef HAVE_peephole
extern rtx_insn *peephole (rtx_insn *); extern rtx_insn *peephole (rtx_insn *);
#endif
extern void output_shared_constant_pool (void); extern void output_shared_constant_pool (void);