From: Trevor Saunders Date: Fri, 21 Aug 2015 01:15:15 +0000 (+0000) Subject: always define HAVE_peephole2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=70b0dcce28f993b2d6fcf7851bc8aadc7b60c38d;p=gcc.git always define HAVE_peephole2 gcc/ChangeLog: 2015-08-20 Trevor Saunders * genconfig.c (main): Always define HAVE_cc0. * recog.c (rest_of_handle_peephole2): Adjust. From-SVN: r227051 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5debccad108..294350144c8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-08-20 Trevor Saunders + + * genconfig.c (main): Always define HAVE_cc0. + * recog.c (rest_of_handle_peephole2): Adjust. + 2015-08-20 Trevor Saunders * reorg.c (relax_delay_slots): Don't use #if to check value of diff --git a/gcc/genconfig.c b/gcc/genconfig.c index acbf381fa17..fc3c1eb6fd9 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 c595bbdea5c..352aec2047a 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -3018,7 +3018,6 @@ split_all_insns_noflow (void) return 0; } -#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; }