diff options
author | Trevor Saunders <tbsaunde+gcc@tbsaunde.org> | 2015-10-21 21:05:02 +0000 |
---|---|---|
committer | Trevor Saunders <tbsaunde@gcc.gnu.org> | 2015-10-21 21:05:02 +0000 |
commit | e90bedf52c86a7b4e2e0a1f8a5a1450725cb95b6 (patch) | |
tree | 7e4247b26f99c762d570b1e1456c1d1e1167819e /gcc/genattr.c | |
parent | 0a798c16c13970d020bc5b93c1aceac9ec5dd7a1 (diff) | |
download | gcc-e90bedf52c86a7b4e2e0a1f8a5a1450725cb95b6.zip gcc-e90bedf52c86a7b4e2e0a1f8a5a1450725cb95b6.tar.gz gcc-e90bedf52c86a7b4e2e0a1f8a5a1450725cb95b6.tar.bz2 |
unconditionally compile most of the delay slot code
gcc/ChangeLog:
2015-10-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
* cfgrtl.c (pass_free_cfg::execute): Adjust.
* final.c (dbr_sequence_length): Always define.
(shorten_branches): Adjust.
* genattr-common.c (main): Always define DELAY_SLOTS.
* genattr.c (main): Unconditionally declare functions and define
macros related to delay slots.
* genattrtab.c (write_eligible_delay): Adjust.
(main): Always write out delay slot functions.
* opts.c (default_options_table): Adjust.
* reorg.c (redirect_with_delay_slots_safe_p): Likewise.
(redirect_with_delay_list_safe_p): Likewise.
(fill_simple_delay_slots): Likewise.
(fill_slots_from_thread): Likewise.
(make_return_insns): Likewise.
(dbr_schedule): Likewise.
(rest_of_handle_delay_slots): Likewise.
(pass_delay_slots::gate): Likewise.
* toplev.c (process_options): Likewise.
From-SVN: r229145
Diffstat (limited to 'gcc/genattr.c')
-rw-r--r-- | gcc/genattr.c | 39 |
1 files changed, 15 insertions, 24 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c index d31f0073..e45f87c 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -140,9 +140,8 @@ find_tune_attr (rtx exp) int main (int argc, char **argv) { - int have_delay = 0; - int have_annul_true = 0; - int have_annul_false = 0; + bool have_annul_true = false; + bool have_annul_false = false; int num_insn_reservations = 0; int i; @@ -172,29 +171,13 @@ main (int argc, char **argv) break; case DEFINE_DELAY: - if (! have_delay) - { - printf ("extern int num_delay_slots (rtx_insn *);\n"); - printf ("extern int eligible_for_delay (rtx_insn *, int, rtx_insn *, int);\n\n"); - printf ("extern int const_num_delay_slots (rtx_insn *);\n\n"); - have_delay = 1; - } - for (i = 0; i < XVECLEN (def, 1); i += 3) { - if (XVECEXP (def, 1, i + 1) && ! have_annul_true) - { - printf ("#define ANNUL_IFTRUE_SLOTS\n"); - printf ("extern int eligible_for_annul_true (rtx_insn *, int, rtx_insn *, int);\n"); - have_annul_true = 1; - } - - if (XVECEXP (def, 1, i + 2) && ! have_annul_false) - { - printf ("#define ANNUL_IFFALSE_SLOTS\n"); - printf ("extern int eligible_for_annul_false (rtx_insn *, int, rtx_insn *, int);\n"); - have_annul_false = 1; - } + if (XVECEXP (def, 1, i + 1)) + have_annul_true = true; + + if (XVECEXP (def, 1, i + 2)) + have_annul_false = true; } break; @@ -208,6 +191,14 @@ main (int argc, char **argv) } } + printf ("extern int num_delay_slots (rtx_insn *);\n"); + printf ("extern int eligible_for_delay (rtx_insn *, int, rtx_insn *, int);\n\n"); + printf ("extern int const_num_delay_slots (rtx_insn *);\n\n"); + printf ("#define ANNUL_IFTRUE_SLOTS %d\n", have_annul_true); + printf ("extern int eligible_for_annul_true (rtx_insn *, int, rtx_insn *, int);\n"); + printf ("#define ANNUL_IFFALSE_SLOTS %d\n", have_annul_false); + printf ("extern int eligible_for_annul_false (rtx_insn *, int, rtx_insn *, int);\n"); + if (num_insn_reservations > 0) { bool has_tune_attr |