diff options
author | Jerry Quinn <jlquinn@optonline.net> | 2004-07-09 03:29:35 +0000 |
---|---|---|
committer | Jerry Quinn <jlquinn@gcc.gnu.org> | 2004-07-09 03:29:35 +0000 |
commit | 4b4bf9414ffd808a7f93bb518cae543b4df45199 (patch) | |
tree | 6ef911acbe6f351441274664098acc17958f8cc8 /gcc/cfgrtl.c | |
parent | e9eb809dec69b6280ed2f2830efd1ac8b7d9bcb8 (diff) | |
download | gcc-4b4bf9414ffd808a7f93bb518cae543b4df45199.zip gcc-4b4bf9414ffd808a7f93bb518cae543b4df45199.tar.gz gcc-4b4bf9414ffd808a7f93bb518cae543b4df45199.tar.bz2 |
alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
2004-07-08 Jerry Quinn <jlquinn@optonline.net>
* alias.c (nonlocal_mentioned_p, nonlocal_referenced_p,
nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P,
NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
* bb-reorder.c (mark_bb_for_unlikely_executed_section,
add_labels_and_missing_jumps, find_jump_block,
fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
Likewise.
* bt-load.c (btr_referenced_p, compute_defs_uses_and_gen,
link_btr_uses, move_btr_def): Likewise.
* builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto,
expand_builtin_expect_jump): Likewise.
* caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise.
* calls.c (expand_call, emit_library_call_value_1): Likewise.
* cfganal.c (forwarder_block_p): Likewise.
* cfgbuild.c (inside_basic_block_p, count_basic_blocks,
make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1,
find_bb_boundaries): Likewise.
* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
merge_blocks_move_predecessor_nojumps,
merge_blocks_move_successor_nojumps, insns_match_p,
flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge,
try_optimize_cfg): Likewise.
* cfgexpand.c (expand_block, construct_exit_block): Likewise.
* cfglayout.c (skip_insns_after_block, label_for_bb,
record_effective_endpoints, insn_locators_initialize,
fixup_reorder_chain, update_unlikely_executed_notes): Likewise.
* cfgmainloop.c (create_loop_notes): Likewise.
* cfgrtl.c (delete_insn, delete_insn_chain,
create_basic_block_structure, rtl_delete_block, free_bb_for_insn,
update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks,
block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
redirect_branch_edge, force_nonfallthru_and_redirect,
rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p,
rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb,
update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info,
purge_dead_edges, cfg_layout_redirect_edge_and_branch,
cfg_layout_delete_block, cfg_layout_can_merge_blocks_p,
cfg_layout_merge_blocks, rtl_block_ends_with_call_p,
need_fake_edge_p, rtl_flow_call_edges_add): Likewise.
* combine.c (combine_instructions, can_combine_p, try_combine,
find_split_point, record_dead_and_set_regs, reg_dead_at_p,
distribute_notes, distribute_links, insn_cuid): Likewise.
* cse.c (fold_rtx, cse_insn, cse_around_loop,
invalidate_skipped_block, cse_set_around_loop,
cse_end_of_basic_block, cse_main, cse_basic_block,
cse_condition_code_reg): Likewise.
* cselib.c (cselib_process_insn): Likewise.
* ddg.c (create_ddg): Likewise.
* df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify):
Likewise.
* dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug,
gen_label_die, dwarf2out_var_location): Likewise.
* emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn,
next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn,
last_call_insn, active_insn_p, next_label, prev_label,
link_cc0_insns, next_cc0_user, try_split, add_insn_after,
add_insn_before, remove_insn, add_function_usage_to,
reorder_insns, find_line_note, remove_unnecessary_notes,
emit_insn_after_1, classify_insn): Likewise.
* except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before,
connect_post_landing_pads, sjlj_mark_call_sites,
sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers,
can_throw_internal, can_throw_external, set_nothrow_function_flags,
convert_to_eh_region_ranges): Likewise.
* explow.c (optimize_save_area_alloca): Likewise.
* expr.c (expand_expr_real): Likewise.
* final.c (insn_current_reference_address, compute_alignments,
shorten_branches, final, scan_ahead_for_unlikely_executed_note,
final_scan_insn, output_asm_label, leaf_function_p): Likewise.
* flow.c (first_insn_after_basic_block_note, delete_dead_jumptables,
propagate_block_delete_insn, propagate_one_insn,
init_propagate_block_info, propagate_block, libcall_dead_p,
mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment):
Likewise.
* function.c (instantiate_virtual_regs, reorder_blocks_1,
expand_function_start, expand_function_end, contains,
thread_prologue_and_epilogue_insns,
reposition_prologue_and_epilogue_notes): Likewise.
* gcse.c (constprop_register, bypass_conditional_jumps,
insert_insn_end_bb, gcse_after_reload): Likewise.
* genemit.c (gen_expand, gen_split): Likewise.
* genpeep.c (gen_peephole, main): Likewise.
* global.c (build_insn_chain): Likewise.
* graph.c (node_data, print_rtl_graph_with_bb): Likewise.
* haifa-sched.c (unlink_other_notes, unlink_line_notes,
get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes,
restore_line_notes, rm_redundant_line_notes, rm_other_notes,
ok_for_early_queue_removal, set_priorities, sched_init): Likewise.
* ifcvt.c (count_bb_insns, first_active_insn, last_active_insn,
cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block,
merge_if_block, block_jumps_and_fallthru_p, find_if_block,
dead_or_predicable): Likewise.
* integrate.c (try_constants): Likewise.
* jump.c (rebuild_jump_labels, cleanup_barriers,
purge_line_number_notes, init_label_info, mark_all_labels,
squeeze_notes, get_label_before, get_label_after,
reversed_comparison_code_parts, simplejump_p, pc_set,
returnjump_p, onlyjump_p, follow_jumps, mark_jump_label,
delete_barrier, delete_prior_computation, delete_computation,
delete_related_insns, delete_for_peephole, redirect_jump):
Likewise.
* lcm.c (optimize_mode_switching): Likewise.
* local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc):
Likewise.
* loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise.
* loop-invariant.c (find_exits, find_invariants_bb): Likewise.
* loop-iv.c (simplify_using_assignment): Likewise.
* loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg,
libcall_benefit, skip_consec_insns, move_movables, prescan_loop,
find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop,
loop_bivs_init_find, strength_reduce, check_insn_for_bivs,
check_insn_for_givs, check_final_value, update_giv_derive,
basic_induction_var, product_cheap_p, check_dbra_loop,
loop_insn_first_p, last_use_this_basic_block,
canonicalize_condition, get_condition, loop_regs_scan, load_mems,
try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise.
* modulo-sched.c (doloop_register_get, find_line_note, sms_schedule,
sms_schedule_by_order): Likewise.
* optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise.
* postreload.c (reload_cse_simplify_operands, reload_combine,
reload_cse_move2add): Likewise.
* predict.c (can_predict_insn_p, estimate_probability,
expected_value_to_br_prob, process_note_predictions): Likewise.
* print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise.
* profile.c (branch_prob): Likewise.
* ra-build.c (live_out_1, livethrough_conflicts_bb,
detect_webs_set_in_cond_jump): Likewise.
* ra-debug.c (ra_print_rtx_object, ra_debug_insns,
ra_print_rtl_with_bb): Likewise.
* ra-rewrite.c (insert_stores, rewrite_program2): Likewise.
* recog.c (next_insn_tests_no_inequality, find_single_use,
split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise.
* reg-stack.c (next_flags_user, record_label_references,
emit_swap_insn, swap_rtx_condition, subst_stack_regs,
compensate_edge, convert_regs_1): Likewise.
* regclass.c (scan_one_insn): Likewise.
* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
regmove_optimize, fixup_match_1, single_set_for_csa,
combine_stack_adjustments_for_block): Likewise.
* regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise.
* reload.c (find_reloads, find_reloads_address_1, subst_reloads,
find_equiv_reg): Likewise.
* reload1.c (reload, calculate_needs_all_insns, set_label_offsets,
reload_as_needed, emit_input_reload_insns, do_output_reload,
delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges):
Likewise.
* reorg.c (find_end_label, emit_delay_sequence,
delete_from_delay_slot, delete_scheduled_jump, optimize_skip,
get_jump_flags, rare_destination, mostly_true_jump,
try_merge_delay_insns, redundant_insn, own_thread_p,
fill_simple_delay_slots, fill_slots_from_thread,
fill_eager_delay_slots, relax_delay_slots, make_return_insns,
dbr_schedule): Likewise.
* resource.c (find_basic_block, next_insn_no_annul,
find_dead_or_set_registers, mark_target_live_regs): Likewise.
* rtl.h (RTX_PREV): Likewise.
* rtlanal.c (global_reg_mentioned_p, no_labels_between_p,
no_jumps_between_p, reg_used_between_p, reg_referenced_between_p,
reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage,
find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1,
tablejump_p, computed_jump_p, insns_safe_to_move_p,
find_first_parameter_load, can_hoist_insn_p): Likewise.
* sched-deps.c (get_condition, add_dependence, sched_analyze_2,
sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise.
* sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns,
schedule_ebbs): Likewise.
* sched-rgn.c (is_cfg_nonregular, find_conditional_protection,
is_conditionally_protected, can_schedule_ready_p,
add_branch_dependences, debug_dependencies): Likewise.
* stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable):
Likewise.
* unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p,
reg_dead_after_loop, loop_find_equiv_value, loop_iterations,
set_dominates_use, ujump_to_loop_cont): Likewise.
* var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise.
* varasm.c (output_constant_pool_1): Likewise.
From-SVN: r84341
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r-- | gcc/cfgrtl.c | 140 |
1 files changed, 70 insertions, 70 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index ae073c4..8d17d06 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -118,7 +118,7 @@ delete_insn (rtx insn) rtx note; bool really_delete = true; - if (GET_CODE (insn) == CODE_LABEL) + if (LABEL_P (insn)) { /* Some labels can't be directly removed from the INSN chain, as they might be references via variables, constant pool etc. @@ -147,23 +147,23 @@ delete_insn (rtx insn) /* If deleting a jump, decrement the use count of the label. Deleting the label itself should happen in the normal course of block merging. */ - if (GET_CODE (insn) == JUMP_INSN + if (JUMP_P (insn) && JUMP_LABEL (insn) - && GET_CODE (JUMP_LABEL (insn)) == CODE_LABEL) + && LABEL_P (JUMP_LABEL (insn))) LABEL_NUSES (JUMP_LABEL (insn))--; /* Also if deleting an insn that references a label. */ else { while ((note = find_reg_note (insn, REG_LABEL, NULL_RTX)) != NULL_RTX - && GET_CODE (XEXP (note, 0)) == CODE_LABEL) + && LABEL_P (XEXP (note, 0))) { LABEL_NUSES (XEXP (note, 0))--; remove_note (insn, note); } } - if (GET_CODE (insn) == JUMP_INSN + if (JUMP_P (insn) && (GET_CODE (PATTERN (insn)) == ADDR_VEC || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)) { @@ -179,7 +179,7 @@ delete_insn (rtx insn) /* When deleting code in bulk (e.g. removing many unreachable blocks) we can delete a label that's a target of the vector before deleting the vector itself. */ - if (GET_CODE (label) != NOTE) + if (!NOTE_P (label)) LABEL_NUSES (label)--; } } @@ -218,7 +218,7 @@ delete_insn_chain (rtx start, rtx finish) while (1) { next = NEXT_INSN (start); - if (GET_CODE (start) == NOTE && !can_delete_note_p (start)) + if (NOTE_P (start) && !can_delete_note_p (start)) ; else next = delete_insn (start); @@ -265,7 +265,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after) rtx after; - if (GET_CODE (head) == CODE_LABEL) + if (LABEL_P (head)) after = head; else { @@ -285,7 +285,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after) if (!head && !end) head = end = bb_note = emit_note_after (NOTE_INSN_BASIC_BLOCK, get_last_insn ()); - else if (GET_CODE (head) == CODE_LABEL && end) + else if (LABEL_P (head) && end) { bb_note = emit_note_after (NOTE_INSN_BASIC_BLOCK, head); if (head == end) @@ -381,7 +381,7 @@ rtl_delete_block (basic_block b) for (insn = PREV_INSN (BB_HEAD (b)); insn; insn = PREV_INSN (insn)) { - if (GET_CODE (insn) != NOTE) + if (!NOTE_P (insn)) break; if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_PREDICTION || NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_CONT) @@ -390,7 +390,7 @@ rtl_delete_block (basic_block b) insn = BB_HEAD (b); - if (GET_CODE (insn) == CODE_LABEL) + if (LABEL_P (insn)) maybe_remove_eh_handler (insn); /* Include any jump table following the basic block. */ @@ -400,7 +400,7 @@ rtl_delete_block (basic_block b) /* Include any barrier that may follow the basic block. */ tmp = next_nonnote_insn (end); - if (tmp && GET_CODE (tmp) == BARRIER) + if (tmp && BARRIER_P (tmp)) end = tmp; /* Selectively delete the entire chain. */ @@ -436,7 +436,7 @@ free_bb_for_insn (void) { rtx insn; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) != BARRIER) + if (!BARRIER_P (insn)) BLOCK_FOR_INSN (insn) = NULL; } @@ -456,7 +456,7 @@ update_bb_for_insn (basic_block bb) for (insn = BB_HEAD (bb); ; insn = NEXT_INSN (insn)) { - if (GET_CODE (insn) != BARRIER) + if (!BARRIER_P (insn)) set_block_for_insn (insn, bb); if (insn == BB_END (bb)) break; @@ -539,7 +539,7 @@ rtl_merge_blocks (basic_block a, basic_block b) int b_empty = 0; /* If there was a CODE_LABEL beginning B, delete it. */ - if (GET_CODE (b_head) == CODE_LABEL) + if (LABEL_P (b_head)) { /* Detect basic blocks with nothing but a label. This can happen in particular at the end of a function. */ @@ -564,12 +564,12 @@ rtl_merge_blocks (basic_block a, basic_block b) } /* If there was a jump out of A, delete it. */ - if (GET_CODE (a_end) == JUMP_INSN) + if (JUMP_P (a_end)) { rtx prev; for (prev = PREV_INSN (a_end); ; prev = PREV_INSN (prev)) - if (GET_CODE (prev) != NOTE + if (!NOTE_P (prev) || NOTE_LINE_NUMBER (prev) == NOTE_INSN_BASIC_BLOCK || prev == BB_HEAD (a)) break; @@ -592,7 +592,7 @@ rtl_merge_blocks (basic_block a, basic_block b) a_end = PREV_INSN (del_first); } - else if (GET_CODE (NEXT_INSN (a_end)) == BARRIER) + else if (BARRIER_P (NEXT_INSN (a_end))) del_first = NEXT_INSN (a_end); /* Delete everything marked above as well as crap that might be @@ -642,7 +642,7 @@ rtl_can_merge_blocks (basic_block a,basic_block b) && a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR /* If the jump insn has side effects, we can't kill the edge. */ - && (GET_CODE (BB_END (a)) != JUMP_INSN + && (!JUMP_P (BB_END (a)) || (reload_completed ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a))))); } @@ -656,7 +656,7 @@ block_label (basic_block block) if (block == EXIT_BLOCK_PTR) return NULL_RTX; - if (GET_CODE (BB_HEAD (block)) != CODE_LABEL) + if (!LABEL_P (BB_HEAD (block))) { BB_HEAD (block) = emit_label_before (gen_label_rtx (), BB_HEAD (block)); } @@ -727,7 +727,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) /* Remove barriers but keep jumptables. */ while (insn) { - if (GET_CODE (insn) == BARRIER) + if (BARRIER_P (insn)) { if (PREV_INSN (insn)) NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); @@ -736,7 +736,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) if (NEXT_INSN (insn)) PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); } - if (GET_CODE (insn) == CODE_LABEL) + if (LABEL_P (insn)) break; insn = NEXT_INSN (insn); } @@ -788,7 +788,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) delete_insn_chain (label, table); barrier = next_nonnote_insn (BB_END (src)); - if (!barrier || GET_CODE (barrier) != BARRIER) + if (!barrier || !BARRIER_P (barrier)) emit_barrier_after (BB_END (src)); else { @@ -830,7 +830,7 @@ try_redirect_by_replacing_jump (edge e, basic_block target, bool in_cfglayout) /* We don't want a block to end on a line-number note since that has the potential of changing the code between -g and not -g. */ - while (GET_CODE (BB_END (e->src)) == NOTE + while (NOTE_P (BB_END (e->src)) && NOTE_LINE_NUMBER (BB_END (e->src)) >= 0) delete_insn (BB_END (e->src)); @@ -853,7 +853,7 @@ last_loop_beg_note (rtx insn) { rtx last = insn; - for (insn = NEXT_INSN (insn); insn && GET_CODE (insn) == NOTE + for (insn = NEXT_INSN (insn); insn && NOTE_P (insn) && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK; insn = NEXT_INSN (insn)) if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) @@ -875,7 +875,7 @@ redirect_branch_edge (edge e, basic_block target) /* We can only redirect non-fallthru edges of jump insn. */ if (e->flags & EDGE_FALLTHRU) return NULL; - else if (GET_CODE (insn) != JUMP_INSN) + else if (!JUMP_P (insn)) return NULL; /* Recognize a tablejump and adjust all matching cases. */ @@ -1103,7 +1103,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target) for (bb_note = BB_HEAD (jump_block); bb_note && bb_note != NEXT_INSN (BB_END (jump_block)); bb_note = NEXT_INSN (bb_note)) - if (GET_CODE (bb_note) == NOTE + if (NOTE_P (bb_note) && NOTE_LINE_NUMBER (bb_note) == NOTE_INSN_BASIC_BLOCK) break; new_note = emit_note_after (NOTE_INSN_UNLIKELY_EXECUTED_CODE, @@ -1111,7 +1111,7 @@ force_nonfallthru_and_redirect (edge e, basic_block target) NOTE_BASIC_BLOCK (new_note) = jump_block; jump_block->partition = COLD_PARTITION; } - if (GET_CODE (BB_END (jump_block)) == JUMP_INSN + if (JUMP_P (BB_END (jump_block)) && !any_condjump_p (BB_END (jump_block)) && jump_block->succ->crossing_edge ) REG_NOTES (BB_END (jump_block)) = gen_rtx_EXPR_LIST @@ -1212,7 +1212,7 @@ rtl_tidy_fallthru_edge (edge e) If block B consisted only of this single jump, turn it into a deleted note. */ q = BB_END (b); - if (GET_CODE (q) == JUMP_INSN + if (JUMP_P (q) && onlyjump_p (q) && (any_uncondjump_p (q) || (b->succ == e && e->succ_next == NULL))) @@ -1228,7 +1228,7 @@ rtl_tidy_fallthru_edge (edge e) /* We don't want a block to end on a line-number note since that has the potential of changing the code between -g and not -g. */ - while (GET_CODE (q) == NOTE && NOTE_LINE_NUMBER (q) >= 0) + while (NOTE_P (q) && NOTE_LINE_NUMBER (q) >= 0) q = PREV_INSN (q); } @@ -1262,7 +1262,7 @@ back_edge_of_syntactic_loop_p (basic_block bb1, basic_block bb2) for (insn = BB_END (bb1); insn != BB_HEAD (bb2) && count >= 0; insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == NOTE) + if (NOTE_P (insn)) { if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_LOOP_BEG) count++; @@ -1333,7 +1333,7 @@ rtl_split_edge (edge edge_in) if (edge_in->dest != EXIT_BLOCK_PTR && PREV_INSN (BB_HEAD (edge_in->dest)) - && GET_CODE (PREV_INSN (BB_HEAD (edge_in->dest))) == NOTE + && NOTE_P (PREV_INSN (BB_HEAD (edge_in->dest))) && (NOTE_LINE_NUMBER (PREV_INSN (BB_HEAD (edge_in->dest))) == NOTE_INSN_LOOP_BEG) && !back_edge_of_syntactic_loop_p (edge_in->dest, edge_in->src)) @@ -1349,7 +1349,7 @@ rtl_split_edge (edge edge_in) { before = NEXT_INSN (BB_END (edge_in->src)); if (before - && GET_CODE (before) == NOTE + && NOTE_P (before) && NOTE_LINE_NUMBER (before) == NOTE_INSN_LOOP_END) before = NEXT_INSN (before); bb = create_basic_block (before, NULL, edge_in->src); @@ -1517,7 +1517,7 @@ commit_one_edge_insertion (edge e, int watch_calls) its return value. */ if (watch_calls && (e->flags & EDGE_FALLTHRU) && !e->dest->pred->pred_next && e->src != ENTRY_BLOCK_PTR - && GET_CODE (BB_END (e->src)) == CALL_INSN) + && CALL_P (BB_END (e->src))) { rtx next = next_nonnote_insn (BB_END (e->src)); @@ -1542,12 +1542,12 @@ commit_one_edge_insertion (edge e, int watch_calls) /* Get the location correct wrt a code label, and "nice" wrt a basic block note, and before everything else. */ tmp = BB_HEAD (bb); - if (GET_CODE (tmp) == CODE_LABEL) + if (LABEL_P (tmp)) tmp = NEXT_INSN (tmp); if (NOTE_INSN_BASIC_BLOCK_P (tmp)) tmp = NEXT_INSN (tmp); if (tmp - && GET_CODE (tmp) == NOTE + && NOTE_P (tmp) && NOTE_LINE_NUMBER (tmp) == NOTE_INSN_UNLIKELY_EXECUTED_CODE) tmp = NEXT_INSN (tmp); if (tmp == BB_HEAD (bb)) @@ -1572,9 +1572,9 @@ commit_one_edge_insertion (edge e, int watch_calls) We know this block has a single successor, so we can just emit the queued insns before the jump. */ - if (GET_CODE (BB_END (bb)) == JUMP_INSN) + if (JUMP_P (BB_END (bb))) for (before = BB_END (bb); - GET_CODE (PREV_INSN (before)) == NOTE + NOTE_P (PREV_INSN (before)) && NOTE_LINE_NUMBER (PREV_INSN (before)) == NOTE_INSN_LOOP_BEG; before = PREV_INSN (before)) ; @@ -1606,7 +1606,7 @@ commit_one_edge_insertion (edge e, int watch_calls) bb_note = NULL_RTX; for (cur_insn = BB_HEAD (bb); cur_insn != NEXT_INSN (BB_END (bb)); cur_insn = NEXT_INSN (cur_insn)) - if (GET_CODE (cur_insn) == NOTE + if (NOTE_P (cur_insn) && NOTE_LINE_NUMBER (cur_insn) == NOTE_INSN_BASIC_BLOCK) { bb_note = cur_insn; @@ -1616,7 +1616,7 @@ commit_one_edge_insertion (edge e, int watch_calls) new_note = emit_note_after (NOTE_INSN_UNLIKELY_EXECUTED_CODE, bb_note); NOTE_BASIC_BLOCK (new_note) = bb; - if (GET_CODE (BB_END (bb)) == JUMP_INSN + if (JUMP_P (BB_END (bb)) && !any_condjump_p (BB_END (bb)) && bb->succ->crossing_edge ) REG_NOTES (BB_END (bb)) = gen_rtx_EXPR_LIST @@ -1655,7 +1655,7 @@ commit_one_edge_insertion (edge e, int watch_calls) if (before) delete_insn (before); } - else if (GET_CODE (last) == JUMP_INSN) + else if (JUMP_P (last)) abort (); /* Mark the basic block for find_sub_basic_blocks. */ @@ -1836,8 +1836,8 @@ print_rtl_with_bb (FILE *outf, rtx rtx_first) } if (in_bb_p[INSN_UID (tmp_rtx)] == NOT_IN_BB - && GET_CODE (tmp_rtx) != NOTE - && GET_CODE (tmp_rtx) != BARRIER) + && !NOTE_P (tmp_rtx) + && !BARRIER_P (tmp_rtx)) fprintf (outf, ";; Insn is not within a basic block\n"); else if (in_bb_p[INSN_UID (tmp_rtx)] == IN_MULTIPLE_BB) fprintf (outf, ";; Insn is in multiple basic blocks\n"); @@ -1874,7 +1874,7 @@ void update_br_prob_note (basic_block bb) { rtx note; - if (GET_CODE (BB_END (bb)) != JUMP_INSN) + if (!JUMP_P (BB_END (bb))) return; note = find_reg_note (BB_END (bb), REG_BR_PROB, NULL_RTX); if (!note || INTVAL (XEXP (note, 0)) == BRANCH_EDGE (bb)->probability) @@ -2013,7 +2013,7 @@ rtl_verify_flow_info_1 (void) err = 1; } if (n_branch - && (GET_CODE (BB_END (bb)) != JUMP_INSN + && (!JUMP_P (BB_END (bb)) || (n_branch > 1 && (any_uncondjump_p (BB_END (bb)) || any_condjump_p (BB_END (bb)))))) { @@ -2036,14 +2036,14 @@ rtl_verify_flow_info_1 (void) error ("Wrong amount of branch edges after conditional jump %i", bb->index); err = 1; } - if (n_call && GET_CODE (BB_END (bb)) != CALL_INSN) + if (n_call && !CALL_P (BB_END (bb))) { error ("Call edges for non-call insn in bb %i", bb->index); err = 1; } if (n_abnormal - && (GET_CODE (BB_END (bb)) != CALL_INSN && n_call != n_abnormal) - && (GET_CODE (BB_END (bb)) != JUMP_INSN + && (!CALL_P (BB_END (bb)) && n_call != n_abnormal) + && (!JUMP_P (BB_END (bb)) || any_condjump_p (BB_END (bb)) || any_uncondjump_p (BB_END (bb)))) { @@ -2071,7 +2071,7 @@ rtl_verify_flow_info_1 (void) block. It ought to contain optional CODE_LABEL followed by NOTE_BASIC_BLOCK. */ x = BB_HEAD (bb); - if (GET_CODE (x) == CODE_LABEL) + if (LABEL_P (x)) { if (BB_END (bb) == x) { @@ -2149,10 +2149,10 @@ rtl_verify_flow_info (void) rtx insn; /* Ensure existence of barrier in BB with no fallthru edges. */ - for (insn = BB_END (bb); !insn || GET_CODE (insn) != BARRIER; + for (insn = BB_END (bb); !insn || !BARRIER_P (insn); insn = NEXT_INSN (insn)) if (!insn - || (GET_CODE (insn) == NOTE + || (NOTE_P (insn) && NOTE_LINE_NUMBER (insn) == NOTE_INSN_BASIC_BLOCK)) { error ("missing barrier after block %i", bb->index); @@ -2175,7 +2175,7 @@ rtl_verify_flow_info (void) else for (insn = NEXT_INSN (BB_END (e->src)); insn != BB_HEAD (e->dest); insn = NEXT_INSN (insn)) - if (GET_CODE (insn) == BARRIER + if (BARRIER_P (insn) #ifndef CASE_DROPS_THROUGH || INSN_P (insn) #else @@ -2218,7 +2218,7 @@ rtl_verify_flow_info (void) case CODE_LABEL: /* An addr_vec is placed outside any basic block. */ if (NEXT_INSN (x) - && GET_CODE (NEXT_INSN (x)) == JUMP_INSN + && JUMP_P (NEXT_INSN (x)) && (GET_CODE (PATTERN (NEXT_INSN (x))) == ADDR_DIFF_VEC || GET_CODE (PATTERN (NEXT_INSN (x))) == ADDR_VEC)) x = NEXT_INSN (x); @@ -2232,9 +2232,9 @@ rtl_verify_flow_info (void) } if (INSN_P (x) - && GET_CODE (x) == JUMP_INSN + && JUMP_P (x) && returnjump_p (x) && ! condjump_p (x) - && ! (NEXT_INSN (x) && GET_CODE (NEXT_INSN (x)) == BARRIER)) + && ! (NEXT_INSN (x) && BARRIER_P (NEXT_INSN (x)))) fatal_insn ("return not followed by barrier", x); if (curr_bb && x == BB_END (curr_bb)) curr_bb = NULL; @@ -2260,7 +2260,7 @@ purge_dead_edges (basic_block bb) bool purged = false; /* If this instruction cannot trap, remove REG_EH_REGION notes. */ - if (GET_CODE (insn) == INSN + if (NONJUMP_INSN_P (insn) && (note = find_reg_note (insn, REG_EH_REGION, NULL))) { rtx eqnote; @@ -2282,7 +2282,7 @@ purge_dead_edges (basic_block bb) } else if (e->flags & EDGE_ABNORMAL_CALL) { - if (GET_CODE (BB_END (bb)) == CALL_INSN + if (CALL_P (BB_END (bb)) && (! (note = find_reg_note (insn, REG_EH_REGION, NULL)) || INTVAL (XEXP (note, 0)) >= 0)) continue; @@ -2295,7 +2295,7 @@ purge_dead_edges (basic_block bb) purged = true; } - if (GET_CODE (insn) == JUMP_INSN) + if (JUMP_P (insn)) { rtx note; edge b,f; @@ -2386,7 +2386,7 @@ purge_dead_edges (basic_block bb) return purged; } - else if (GET_CODE (insn) == CALL_INSN && SIBLING_CALL_P (insn)) + else if (CALL_P (insn) && SIBLING_CALL_P (insn)) { /* First, there should not be any EH or ABCALL edges resulting from non-local gotos and the like. If there were, we shouldn't @@ -2524,7 +2524,7 @@ cfg_layout_redirect_edge_and_branch (edge e, basic_block dest) if (e->flags & EDGE_FALLTHRU) { /* Redirect any branch edges unified with the fallthru one. */ - if (GET_CODE (BB_END (src)) == JUMP_INSN + if (JUMP_P (BB_END (src)) && label_is_jump_target_p (BB_HEAD (e->dest), BB_END (src))) { @@ -2602,7 +2602,7 @@ cfg_layout_delete_block (basic_block bb) insn = bb->rbi->footer; while (insn) { - if (GET_CODE (insn) == BARRIER) + if (BARRIER_P (insn)) { if (PREV_INSN (insn)) NEXT_INSN (PREV_INSN (insn)) = NEXT_INSN (insn); @@ -2611,7 +2611,7 @@ cfg_layout_delete_block (basic_block bb) if (NEXT_INSN (insn)) PREV_INSN (NEXT_INSN (insn)) = PREV_INSN (insn); } - if (GET_CODE (insn) == CODE_LABEL) + if (LABEL_P (insn)) break; insn = NEXT_INSN (insn); } @@ -2682,7 +2682,7 @@ cfg_layout_can_merge_blocks_p (basic_block a, basic_block b) && a != ENTRY_BLOCK_PTR && b != EXIT_BLOCK_PTR /* If the jump insn has side effects, we can't kill the edge. */ - && (GET_CODE (BB_END (a)) != JUMP_INSN + && (!JUMP_P (BB_END (a)) || (reload_completed ? simplejump_p (BB_END (a)) : onlyjump_p (BB_END (a))))); } @@ -2697,14 +2697,14 @@ cfg_layout_merge_blocks (basic_block a, basic_block b) #endif /* If there was a CODE_LABEL beginning B, delete it. */ - if (GET_CODE (BB_HEAD (b)) == CODE_LABEL) + if (LABEL_P (BB_HEAD (b))) delete_insn (BB_HEAD (b)); /* We should have fallthru edge in a, or we can do dummy redirection to get it cleaned up. */ - if (GET_CODE (BB_END (a)) == JUMP_INSN) + if (JUMP_P (BB_END (a))) try_redirect_by_replacing_jump (a->succ, b, true); - if (GET_CODE (BB_END (a)) == JUMP_INSN) + if (JUMP_P (BB_END (a))) abort (); /* Possible line number notes should appear in between. */ @@ -2805,11 +2805,11 @@ rtl_block_ends_with_call_p (basic_block bb) { rtx insn = BB_END (bb); - while (GET_CODE (insn) != CALL_INSN + while (!CALL_P (insn) && insn != BB_HEAD (bb) && keep_with_call_p (insn)) insn = PREV_INSN (insn); - return (GET_CODE (insn) == CALL_INSN); + return (CALL_P (insn)); } /* Return 1 if BB ends with a conditional branch, 0 otherwise. */ @@ -2829,7 +2829,7 @@ need_fake_edge_p (rtx insn) if (!INSN_P (insn)) return false; - if ((GET_CODE (insn) == CALL_INSN + if ((CALL_P (insn) && !SIBLING_CALL_P (insn) && !find_reg_note (insn, REG_NORETURN, NULL) && !find_reg_note (insn, REG_ALWAYS_RETURN, NULL) @@ -2930,7 +2930,7 @@ rtl_flow_call_edges_add (sbitmap blocks) /* Don't split the block between a call and an insn that should remain in the same block as the call. */ - if (GET_CODE (insn) == CALL_INSN) + if (CALL_P (insn)) while (split_at_insn != BB_END (bb) && keep_with_call_p (NEXT_INSN (split_at_insn))) split_at_insn = NEXT_INSN (split_at_insn); |