From a38e7aa5444eeef446063429186a41639d8cf186 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Mon, 21 May 2007 08:19:50 +0200 Subject: gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER... * gengtype.c (adjust_field_rtx_def): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ddg.c (create_ddg): LIkewise. * final.c (final): Remove hunk moving line numbernotes around since they are no longer present at this stage. (final_scan_insn): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (output_asm_label): Likewise. * reorg.c (dbr_schedule): Likewise. * haifa-sched.c (unlink_other_notes): Likewise. * mode-switching.c (optimize_mode_switching): Likewise. * graph.c (start_bb): Likewise. * rtl.def (NOTE): Update description. * jump.c (squeeze_notes): Delete. (mark_jump_label): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. * ifcvt.c (dead_or_predicable): Remove call of squeeze_notes. * dwarf2out.c (gen_label_die): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (dwarf2out_var_location): Likewise. * cfgbuild.c (make_edges): Likewise. (find_basic_blocks_1): Likewise. * function.c (reorder_blocks_1): Likewise. (epilogue_done): Likewise. (reposition_prologue_and_epilogue_notes): Likewise. * print-rtl.c (print_rtx): Likewise; drop code for printing line number notes. (print_rtl): Likewise. (print_rtl_single): Likewise. * gcse.c (insert_insn_start_bb): Likewise. * alias.c (init_alias_analysis): Likewise. * calls.c (fixup_tail_calls): Likewise. * except.c (sjlj_emit_function_enter): Likewise. * emit-rtl.c (add_insn_after): Likeiwse. (emit_label_before): Likewise. (emit_label_after): Likewise. (emit_note_before, emit_note_after, emit_note): Update parameter to be enum insn_note; do not deal with source files. * cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Use NOTE_KIND instead of NOTE_LINE_NUMBER; use NOTE_INSN_BASIC_BLOCK_P when possible. (merge_blocks_move_successor_nojumps): Simplify now when we don't have BLOCK notes. (try_optimize_cfg): Likewise. * cfglayout.c (skip_insns_after_block): Likewise. (record_effective_endpoints): Likewise. (duplicate_insn_chain): Likewise. * varasm.c (output_constant_pool_1): Likewise. * sched-deps.c (sched_analyze): Likewise. * rtl.c (NOTE_INSN_MAX_isnt_negative_adjust_NOTE_INSN_BIAS): Exterminate. (note_insn_name): Simplify now when NOTE_INSN_BIAS is gone. * rtl.h (NOTE_SOURCE_LOCATION, NOTE_EXPANDED_LOCATION): Exterminate. (SET_INSN_DELETED): Simplify. (NOTE_LINE_NUMBER): Exterminate. (NOTE_LINE_KIND): New. (NOTE_INSN_BASIC_BLOCK_P): Update. (enum insn_note): Simplify. (GET_NOTE_INSN_NAME) Simplify. (emit_note_before, emit_note_after, emit_note): Update prototype. (squeeze_notes): Remove. * sched-int.h (NOTE_NOT_BB_P): Update. * resource.c (mark_target_live_regs): Update. * sched-rgn.c (debug_dependencies): Update. * sched-vis.c (print_insn): Update. * config/alpha/alpha.c (alpha_handle_trap_shadows): Update. * config/i386/i386.c (ix86_output_function_epilogue): Update. * config/sh/sh.c (sh_adjust_unroll_max): Function dead since gcc 4.0.0. (TARGET_ADJUST_UNROLL_MAX): Likewise. (split_branches): Update. (sh_optimize_target_register_callee_saved): Remove hunk dead since gcc 4.0.0. (sh_adjust_unroll_max): Exterminate. * config/c4x/c4x.c (c4x_reorg): Use SET_INSN_DELETED. * config/m68hc11/m68hc11.c (m68hc11_check_z_replacement): Likewise. (m68hc11_reorg): Likewise. * config/ia64/ia64.c (emit_insn_group_barriers): Update. (emit_predicate_relation_info): Update. (process_for_unwind_directive): Update. * config/rs6000/rs6000.c (rs6000_output_function_epilogue): Update. (output_call): Update. * config/pa/pa.c (output_lbranch): Update. (output_millicode_call): Update. (output_call): Update. (pa_combine_instructions): Update. * config/mips/mips.c (mips16_gp_pseudo_reg): Update. * config/bfin/bfin.c (gen_one_bundle): Update. * cfgrtl.c (can_delete_note_p): Update. (delete_insn): Update. (rtl_merge_blocks): Update. (commit_one_edge_insertion): Update. (rtl_verify_flow_info): Update. * stmt.c (expand_case): Do not call squeeze_notes. From-SVN: r124895 --- gcc/rtl.h | 33 +++++++++++---------------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'gcc/rtl.h') diff --git a/gcc/rtl.h b/gcc/rtl.h index 2ba7c8a..61c40f5 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -834,19 +834,12 @@ extern const char * const reg_note_name[]; #define NOTE_DATA(INSN) RTL_CHECKC1 (INSN, 4, NOTE) #define NOTE_DELETED_LABEL_NAME(INSN) XCSTR (INSN, 4, NOTE) #ifdef USE_MAPPED_LOCATION -#define NOTE_SOURCE_LOCATION(INSN) XCUINT (INSN, 5, NOTE) -#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \ - (XLOC) = expand_location (NOTE_SOURCE_LOCATION (INSN)) #define SET_INSN_DELETED(INSN) \ - (PUT_CODE (INSN, NOTE), NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED) + (PUT_CODE (INSN, NOTE), NOTE_KIND (INSN) = NOTE_INSN_DELETED) #else -#define NOTE_EXPANDED_LOCATION(XLOC, INSN) \ - ((XLOC).file = NOTE_SOURCE_FILE (INSN), \ - (XLOC).line = NOTE_LINE_NUMBER (INSN)) -#define NOTE_SOURCE_FILE(INSN) XCSTR (INSN, 4, NOTE) #define SET_INSN_DELETED(INSN) \ - (PUT_CODE (INSN, NOTE), NOTE_SOURCE_FILE (INSN) = 0, \ - NOTE_LINE_NUMBER (INSN) = NOTE_INSN_DELETED) + (PUT_CODE (INSN, NOTE), \ + NOTE_KIND (INSN) = NOTE_INSN_DELETED) #endif #define NOTE_BLOCK(INSN) XCTREE (INSN, 4, NOTE) #define NOTE_EH_HANDLER(INSN) XCINT (INSN, 4, NOTE) @@ -855,12 +848,12 @@ extern const char * const reg_note_name[]; /* In a NOTE that is a line number, this is the line number. Other kinds of NOTEs are identified by negative numbers here. */ -#define NOTE_LINE_NUMBER(INSN) XCINT (INSN, 5, NOTE) +#define NOTE_KIND(INSN) XCINT (INSN, 5, NOTE) /* Nonzero if INSN is a note marking the beginning of a basic block. */ #define NOTE_INSN_BASIC_BLOCK_P(INSN) \ (GET_CODE (INSN) == NOTE \ - && NOTE_LINE_NUMBER (INSN) == NOTE_INSN_BASIC_BLOCK) + && NOTE_KIND (INSN) == NOTE_INSN_BASIC_BLOCK) /* Variable declaration and the location of a variable. */ #define NOTE_VAR_LOCATION_DECL(INSN) (XCTREE (XCEXP (INSN, 4, NOTE), \ @@ -868,7 +861,7 @@ extern const char * const reg_note_name[]; #define NOTE_VAR_LOCATION_LOC(INSN) (XCEXP (XCEXP (INSN, 4, NOTE), \ 1, VAR_LOCATION)) -/* Codes that appear in the NOTE_LINE_NUMBER field for kinds of notes +/* Codes that appear in the NOTE_KIND field for kinds of notes that are not line numbers. These codes are all negative. Notice that we do not try to use zero here for any of @@ -879,9 +872,6 @@ extern const char * const reg_note_name[]; enum insn_note { - /* Keep all of these numbers negative. Adjust as needed. */ - NOTE_INSN_BIAS = -100, - #define DEF_INSN_NOTE(NAME) NAME, #include "insn-notes.def" #undef DEF_INSN_NOTE @@ -891,9 +881,9 @@ enum insn_note /* Names for NOTE insn's other than line numbers. */ -extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS]; +extern const char * const note_insn_name[NOTE_INSN_MAX]; #define GET_NOTE_INSN_NAME(NOTE_CODE) \ - (note_insn_name[(NOTE_CODE) - (int) NOTE_INSN_BIAS]) + (note_insn_name[(NOTE_CODE)]) /* The name of a label, in case it corresponds to an explicit label in the input source code. */ @@ -1542,7 +1532,7 @@ extern rtx emit_call_insn_before_noloc (rtx, rtx); extern rtx emit_call_insn_before_setloc (rtx, rtx, int); extern rtx emit_barrier_before (rtx); extern rtx emit_label_before (rtx, rtx); -extern rtx emit_note_before (int, rtx); +extern rtx emit_note_before (enum insn_note, rtx); extern rtx emit_insn_after (rtx, rtx); extern rtx emit_insn_after_noloc (rtx, rtx); extern rtx emit_insn_after_setloc (rtx, rtx, int); @@ -1554,13 +1544,13 @@ extern rtx emit_call_insn_after_noloc (rtx, rtx); extern rtx emit_call_insn_after_setloc (rtx, rtx, int); extern rtx emit_barrier_after (rtx); extern rtx emit_label_after (rtx, rtx); -extern rtx emit_note_after (int, rtx); +extern rtx emit_note_after (enum insn_note, rtx); extern rtx emit_insn (rtx); extern rtx emit_jump_insn (rtx); extern rtx emit_call_insn (rtx); extern rtx emit_label (rtx); extern rtx emit_barrier (void); -extern rtx emit_note (int); +extern rtx emit_note (enum insn_note); extern rtx emit_note_copy (rtx); extern rtx make_insn_raw (rtx); extern rtx make_jump_insn_raw (rtx); @@ -1598,7 +1588,6 @@ extern void mark_jump_label (rtx, rtx, int); extern unsigned int cleanup_barriers (void); /* In jump.c */ -extern bool squeeze_notes (rtx *, rtx *); extern rtx delete_related_insns (rtx); /* In recog.c */ -- cgit v1.1