diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-30 04:08:15 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-10-30 04:08:15 +0000 |
commit | 1d674b45031bb4650ef80a91ac1956764a4ab271 (patch) | |
tree | 7fbdc43691b6544d44daaf19d6ab83d87d89f607 /gcc/config/ia64 | |
parent | 07855d5e09a696667140c9de9b1d943b1f4774f7 (diff) | |
download | gcc-1d674b45031bb4650ef80a91ac1956764a4ab271.tar.gz |
[PATCH 8/9] ENABLE_CHECKING refactoring: target-specific parts
* config/alpha/alpha.c (alpha_function_arg): Use gcc_checking_assert,
flag_checking and/or CHECKING_P to eliminate conditional compilation
on ENABLE_CHECKING.
* config/arm/arm.c (arm_unwind_emit_sequence): Likewise.
* config/bfin/bfin.c (hwloop_optimize): Likewise.
* config/i386/i386.c (ix86_print_operand_address): Likewise.
(output_387_binary_op): Likewise.
* config/ia64/ia64.c (ia64_sched_init, bundling): Likewise.
* config/m68k/m68k.c (m68k_sched_md_init_global): Likewise.
* config/rs6000/rs6000.c (htm_expand_builtin, rs6000_emit_prologue):
Likewise.
* config/rs6000/rs6000.h: Likewise.
* config/visium/visium.c (visium_setup_incoming_varargs): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229567 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/ia64')
-rw-r--r-- | gcc/config/ia64/ia64.c | 108 |
1 files changed, 52 insertions, 56 deletions
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index 879113895f3..d92af177082 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -6125,7 +6125,7 @@ struct reg_write_state /* Cumulative info for the current instruction group. */ struct reg_write_state rws_sum[NUM_REGS]; -#ifdef ENABLE_CHECKING +#if CHECKING_P /* Bitmap whether a register has been written in the current insn. */ HARD_REG_ELT_TYPE rws_insn[(NUM_REGS + HOST_BITS_PER_WIDEST_FAST_INT - 1) / HOST_BITS_PER_WIDEST_FAST_INT]; @@ -7293,15 +7293,13 @@ ia64_sched_init (FILE *dump ATTRIBUTE_UNUSED, int sched_verbose ATTRIBUTE_UNUSED, int max_ready ATTRIBUTE_UNUSED) { -#ifdef ENABLE_CHECKING - rtx_insn *insn; - - if (!sel_sched_p () && reload_completed) - for (insn = NEXT_INSN (current_sched_info->prev_head); - insn != current_sched_info->next_tail; - insn = NEXT_INSN (insn)) - gcc_assert (!SCHED_GROUP_P (insn)); -#endif + if (flag_checking && !sel_sched_p () && reload_completed) + { + for (rtx_insn *insn = NEXT_INSN (current_sched_info->prev_head); + insn != current_sched_info->next_tail; + insn = NEXT_INSN (insn)) + gcc_assert (!SCHED_GROUP_P (insn)); + } last_scheduled_insn = NULL; init_insn_group_barriers (); @@ -9299,54 +9297,52 @@ bundling (FILE *dump, int verbose, rtx_insn *prev_head_insn, rtx_insn *tail) } } -#ifdef ENABLE_CHECKING - { - /* Assert right calculation of middle_bundle_stops. */ - int num = best_state->middle_bundle_stops; - bool start_bundle = true, end_bundle = false; - - for (insn = NEXT_INSN (prev_head_insn); - insn && insn != tail; - insn = NEXT_INSN (insn)) - { - if (!INSN_P (insn)) - continue; - if (recog_memoized (insn) == CODE_FOR_bundle_selector) - start_bundle = true; - else - { - rtx_insn *next_insn; - - for (next_insn = NEXT_INSN (insn); - next_insn && next_insn != tail; - next_insn = NEXT_INSN (next_insn)) - if (INSN_P (next_insn) - && (ia64_safe_itanium_class (next_insn) - != ITANIUM_CLASS_IGNORE - || recog_memoized (next_insn) - == CODE_FOR_bundle_selector) - && GET_CODE (PATTERN (next_insn)) != USE - && GET_CODE (PATTERN (next_insn)) != CLOBBER) - break; + if (flag_checking) + { + /* Assert right calculation of middle_bundle_stops. */ + int num = best_state->middle_bundle_stops; + bool start_bundle = true, end_bundle = false; - end_bundle = next_insn == NULL_RTX - || next_insn == tail - || (INSN_P (next_insn) - && recog_memoized (next_insn) - == CODE_FOR_bundle_selector); - if (recog_memoized (insn) == CODE_FOR_insn_group_barrier - && !start_bundle && !end_bundle - && next_insn - && !unknown_for_bundling_p (next_insn)) - num--; - - start_bundle = false; - } - } + for (insn = NEXT_INSN (prev_head_insn); + insn && insn != tail; + insn = NEXT_INSN (insn)) + { + if (!INSN_P (insn)) + continue; + if (recog_memoized (insn) == CODE_FOR_bundle_selector) + start_bundle = true; + else + { + rtx_insn *next_insn; + + for (next_insn = NEXT_INSN (insn); + next_insn && next_insn != tail; + next_insn = NEXT_INSN (next_insn)) + if (INSN_P (next_insn) + && (ia64_safe_itanium_class (next_insn) + != ITANIUM_CLASS_IGNORE + || recog_memoized (next_insn) + == CODE_FOR_bundle_selector) + && GET_CODE (PATTERN (next_insn)) != USE + && GET_CODE (PATTERN (next_insn)) != CLOBBER) + break; + + end_bundle = next_insn == NULL_RTX + || next_insn == tail + || (INSN_P (next_insn) + && recog_memoized (next_insn) == CODE_FOR_bundle_selector); + if (recog_memoized (insn) == CODE_FOR_insn_group_barrier + && !start_bundle && !end_bundle + && next_insn + && !unknown_for_bundling_p (next_insn)) + num--; + + start_bundle = false; + } + } - gcc_assert (num == 0); - } -#endif + gcc_assert (num == 0); + } free (index_to_bundle_states); finish_bundle_state_table (); |