* rtl.h (emit_note): Remove FILE parameter.
* emit-rtl.c (emit_line_note): Adjust emit_note call.
(emit_note): Remove FILE parameter. Adjust.
* builtins.c (expand_builtin_expect): Adjust emit_note call.
* c-semantics.c (genrtl_scope_stmt): Likewise.
(expand_stmt): Likewise.
* cfglayout.c (reemit_insn_block_notes): Likewise.
(duplicate_insn_chain): Likewise.
* except.c (expand_eh_region_start, expand_eh_region_end,
sjlj_emit_function_enter): Likewise.
* explow.c (probe_stack_range): Likewise.
* expr.c (emit_block_move_via_loop): Likewise.
* function.c (init_function_start, expand_function_start,
expand_function_end, thread_prologue_and_epilogue_insns): Likewise.
* integrate.c (expand_inline_function, copy_insn_list): Likewise.
* reg-stack.c (compensate_edge): Likewise.
* reload1.c (reload): Likewise.
* rtlanal.c (hoist_insn_to_edge): Likewise.
* stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop,
expand_loop_continue_here, expand_end_loop, expand_continue_loop,
expand_exit_loop_top_cond, expand_value_return,
expand_start_bindings_and_block, expand_end_bindings,
expand_decl_cleanup, expand_start_case): Likewise.
* unroll.c (copy_loop_body
* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
* config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore,
rs6000_emit_allocate_stack, rs6000_output_function_prologue,
rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise.
* config/sh/sh.c (sh_output_mi_thunk): Likewise.
* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
* ada/misc.c (record_code_position): Likewise.
From-SVN: r68561
+2003-06-27 Nathan Sidwell <nathan@codesourcery.com>
+
+ * rtl.h (emit_note): Remove FILE parameter.
+ * emit-rtl.c (emit_line_note): Adjust emit_note call.
+ (emit_note): Remove FILE parameter. Adjust.
+ * builtins.c (expand_builtin_expect): Adjust emit_note call.
+ * c-semantics.c (genrtl_scope_stmt): Likewise.
+ (expand_stmt): Likewise.
+ * cfglayout.c (reemit_insn_block_notes): Likewise.
+ (duplicate_insn_chain): Likewise.
+ * except.c (expand_eh_region_start, expand_eh_region_end,
+ sjlj_emit_function_enter): Likewise.
+ * explow.c (probe_stack_range): Likewise.
+ * expr.c (emit_block_move_via_loop): Likewise.
+ * function.c (init_function_start, expand_function_start,
+ expand_function_end, thread_prologue_and_epilogue_insns): Likewise.
+ * integrate.c (expand_inline_function, copy_insn_list): Likewise.
+ * reg-stack.c (compensate_edge): Likewise.
+ * reload1.c (reload): Likewise.
+ * rtlanal.c (hoist_insn_to_edge): Likewise.
+ * stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop,
+ expand_loop_continue_here, expand_end_loop, expand_continue_loop,
+ expand_exit_loop_top_cond, expand_value_return,
+ expand_start_bindings_and_block, expand_end_bindings,
+ expand_decl_cleanup, expand_start_case): Likewise.
+ * unroll.c (copy_loop_body
+ * config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
+ * config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
+ * config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore,
+ rs6000_emit_allocate_stack, rs6000_output_function_prologue,
+ rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise.
+ * config/sh/sh.c (sh_output_mi_thunk): Likewise.
+ * config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.
+
2003-06-27 Nathan Sidwell <nathan@codesourcery.com>
* c-tree.h (grokfield): Remove unused filename and line parameters.
+2003-06-27 Nathan Sidwell <nathan@codesourcery.com>
+
+ * misc.c (record_code_position): Adjust emit_note call.
+
2003-06-26 Neil Booth <neil@daikokuya.co.uk>
* misc.c (gnat_handle_option): Don't check for missing arguments.
addressable needs some fixups and also for above reason. */
save_gnu_tree (gnat_node,
build (RTL_EXPR, void_type_node, NULL_TREE,
- (tree) emit_note (0, NOTE_INSN_DELETED)),
+ (tree) emit_note (NOTE_INSN_DELETED)),
1);
}
rtx_c = expand_expr (c, NULL_RTX, GET_MODE (target), EXPAND_NORMAL);
- note = emit_note (NULL, NOTE_INSN_EXPECTED_VALUE);
+ note = emit_note (NOTE_INSN_EXPECTED_VALUE);
NOTE_EXPECTED_VALUE (note) = gen_rtx_EQ (VOIDmode, target, rtx_c);
}
}
else if (!SCOPE_NULLIFIED_P (t))
{
- rtx note = emit_note (NULL,
- (SCOPE_BEGIN_P (t)
- ? NOTE_INSN_BLOCK_BEG
- : NOTE_INSN_BLOCK_END));
+ rtx note = emit_note (SCOPE_BEGIN_P (t)
+ ? NOTE_INSN_BLOCK_BEG : NOTE_INSN_BLOCK_END);
NOTE_BLOCK (note) = block;
}
&& TREE_CODE (GOTO_DESTINATION (t)) == LABEL_DECL
&& flag_guess_branch_prob)
{
- rtx note = emit_note (NULL, NOTE_INSN_PREDICTION);
+ rtx note = emit_note (NOTE_INSN_PREDICTION);
NOTE_PREDICTION (note) = NOTE_PREDICT (PRED_GOTO, NOT_TAKEN);
}
}
/* change_scope emits before the insn, not after. */
- note = emit_note (NULL, NOTE_INSN_DELETED);
+ note = emit_note (NOTE_INSN_DELETED);
change_scope (note, cur_block, DECL_INITIAL (cfun->decl));
delete_insn (note);
/* Avoid updating of boundaries of previous basic block. The
note will get removed from insn stream in fixup. */
- last = emit_note (NULL, NOTE_INSN_DELETED);
+ last = emit_note (NOTE_INSN_DELETED);
/* Create copy at the end of INSN chain. The chain will
be reordered later. */
/* We always require a valid GP. */
emit_insn (gen_prologue_ldgp ());
- emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ emit_note (NOTE_INSN_PROLOGUE_END);
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in $16. */
reg_names[IN_REG (0)] = ia64_reg_numbers[0];
/* Mark the end of the (empty) prologue. */
- emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ emit_note (NOTE_INSN_PROLOGUE_END);
this = gen_rtx_REG (Pmode, IN_REG (0));
abort ();
emit_move_insn (opcode, insn_after_throw);
- emit_note (NULL, NOTE_INSN_LOOP_BEG);
+ emit_note (NOTE_INSN_LOOP_BEG);
emit_label (loop_start);
do_compare_rtx_and_jump (opcode, tocompare, NE, 1,
emit_move_insn (opcode_addr, mem);
emit_move_insn (opcode, gen_rtx_MEM (SImode, opcode_addr));
- emit_note (NULL, NOTE_INSN_LOOP_CONT);
+ emit_note (NOTE_INSN_LOOP_CONT);
emit_jump (loop_start);
- emit_note (NULL, NOTE_INSN_LOOP_END);
+ emit_note (NOTE_INSN_LOOP_END);
emit_label (loop_exit);
}
\f
{
/* Need a note here so that try_split doesn't get confused. */
if (get_last_insn() == NULL_RTX)
- emit_note (0, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
insn = emit_move_insn (tmp_reg, todec);
try_split (PATTERN (insn), insn, 0);
todec = tmp_reg;
/* A NOTE_INSN_DELETED is supposed to be at the start and end of
the "toplevel" insn chain. */
- emit_note (0, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
rs6000_emit_prologue ();
- emit_note (0, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
/* Expand INSN_ADDRESSES so final() doesn't crash. */
{
/* A NOTE_INSN_DELETED is supposed to be at the start
and end of the "toplevel" insn chain. */
- emit_note (0, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
rs6000_emit_epilogue (FALSE);
- emit_note (0, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
/* Expand INSN_ADDRESSES so final() doesn't crash. */
{
no_new_pseudos = 1;
/* Mark the end of the (empty) prologue. */
- emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ emit_note (NOTE_INSN_PROLOGUE_END);
/* Find the "this" pointer. If the function returns a structure,
the structure return pointer is in r3. */
no_new_pseudos = 1;
current_function_uses_only_leaf_regs = 1;
- emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ emit_note (NOTE_INSN_PROLOGUE_END);
/* Find the "this" pointer. We have such a wide range of ABIs for the
SH that it's best to do this completely machine independently.
no_new_pseudos = 1;
current_function_uses_only_leaf_regs = 1;
- emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ emit_note (NOTE_INSN_PROLOGUE_END);
/* Find the "this" pointer. Normally in %o0, but in ARCH64 if the function
returns a structure, the structure return pointer is there instead. */
const char *file;
int line;
{
+ rtx note;
+
if (line < 0)
abort ();
return NULL_RTX;
}
- return emit_note (file, line);
+ note = emit_note (line);
+ NOTE_SOURCE_FILE (note) = file;
+
+ return note;
}
-/* Make an insn of code NOTE
- with data-fields specified by FILE and LINE
- and add it to the end of the doubly-linked list.
- If it is a line-number NOTE, omit it if it matches the previous one. */
+/* Make an insn of code NOTE or type NOTE_NO
+ and add it to the end of the doubly-linked list. */
rtx
-emit_note (file, line)
- const char *file;
- int line;
+emit_note (note_no)
+ int note_no;
{
rtx note;
note = rtx_alloc (NOTE);
INSN_UID (note) = cur_insn_uid++;
- NOTE_SOURCE_FILE (note) = file;
- NOTE_LINE_NUMBER (note) = line;
+ NOTE_LINE_NUMBER (note) = note_no;
+ NOTE_DATA (note) = 0;
BLOCK_FOR_INSN (note) = NULL;
add_insn (note);
return note;
/* Create a note marking the start of this region. */
new_region->region_number = ++cfun->eh->last_region_number;
- note = emit_note (NULL, NOTE_INSN_EH_REGION_BEG);
+ note = emit_note (NOTE_INSN_EH_REGION_BEG);
NOTE_EH_HANDLER (note) = new_region->region_number;
}
rtx note;
/* Create a note marking the end of this region. */
- note = emit_note (NULL, NOTE_INSN_EH_REGION_END);
+ note = emit_note (NOTE_INSN_EH_REGION_END);
NOTE_EH_HANDLER (note) = cur_region->region_number;
/* Pop. */
plus_constant (XEXP (fc, 0),
sjlj_fc_jbuf_ofs), Pmode);
- note = emit_note (NULL, NOTE_INSN_EXPECTED_VALUE);
+ note = emit_note (NOTE_INSN_EXPECTED_VALUE);
NOTE_EXPECTED_VALUE (note) = gen_rtx_EQ (VOIDmode, x, const0_rtx);
emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
|| REGNO (test_addr) < FIRST_PSEUDO_REGISTER)
test_addr = force_reg (Pmode, test_addr);
- emit_note (NULL, NOTE_INSN_LOOP_BEG);
+ emit_note (NOTE_INSN_LOOP_BEG);
emit_jump (test_lab);
emit_label (loop_lab);
emit_stack_probe (test_addr);
- emit_note (NULL, NOTE_INSN_LOOP_CONT);
+ emit_note (NOTE_INSN_LOOP_CONT);
#ifdef STACK_GROWS_DOWNWARD
#define CMP_OPCODE GTU
emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE,
NULL_RTX, Pmode, 1, loop_lab);
emit_jump (end_lab);
- emit_note (NULL, NOTE_INSN_LOOP_END);
+ emit_note (NOTE_INSN_LOOP_END);
emit_label (end_lab);
emit_stack_probe (last_addr);
y_addr = force_operand (XEXP (y, 0), NULL_RTX);
do_pending_stack_adjust ();
- emit_note (NULL, NOTE_INSN_LOOP_BEG);
+ emit_note (NOTE_INSN_LOOP_BEG);
emit_jump (cmp_label);
emit_label (top_label);
if (tmp != iter)
emit_move_insn (iter, tmp);
- emit_note (NULL, NOTE_INSN_LOOP_CONT);
+ emit_note (NOTE_INSN_LOOP_CONT);
emit_label (cmp_label);
emit_cmp_and_jump_insns (iter, size, LT, NULL_RTX, iter_mode,
true, top_label);
- emit_note (NULL, NOTE_INSN_LOOP_END);
+ emit_note (NOTE_INSN_LOOP_END);
}
\f
/* Copy all or part of a value X into registers starting at REGNO.
/* Make sure first insn is a note even if we don't want linenums.
This makes sure the first insn will never be deleted.
Also, final expects a note to appear there. */
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
/* Set flags used by final.c. */
if (aggregate_value_p (DECL_RESULT (subr)))
The move is supposed to make sdb output more accurate. */
/* Indicate the beginning of the function body,
as opposed to parm setup. */
- emit_note (NULL, NOTE_INSN_FUNCTION_BEG);
+ emit_note (NOTE_INSN_FUNCTION_BEG);
if (GET_CODE (get_last_insn ()) != NOTE)
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
parm_birth_insn = get_last_insn ();
context_display = 0;
/* After the display initializations is where the tail-recursion label
should go, if we end up needing one. Ensure we have a NOTE here
since some things (like trampolines) get placed before this. */
- tail_recursion_reentry = emit_note (NULL, NOTE_INSN_DELETED);
+ tail_recursion_reentry = emit_note (NOTE_INSN_DELETED);
/* Evaluate now the sizes of any types declared among the arguments. */
expand_pending_sizes (nreverse (get_pending_sizes ()));
/* Mark the end of the function body.
If control reaches this insn, the function can drop through
without returning a value. */
- emit_note (NULL, NOTE_INSN_FUNCTION_END);
+ emit_note (NOTE_INSN_FUNCTION_END);
/* Must mark the last line number note in the function, so that the test
coverage code can avoid counting the last line twice. This just tells
already exists a copy of this note somewhere above. This line number
note is still needed for debugging though, so we can't delete it. */
if (flag_test_coverage)
- emit_note (NULL, NOTE_INSN_REPEATED_LINE_NUMBER);
+ emit_note (NOTE_INSN_REPEATED_LINE_NUMBER);
/* Output a linenumber for the end of the function.
SDB depends on this. */
+
emit_line_note_force (input_filename, input_line);
/* Before the return label (if any), clobber the return
/* Retain a map of the prologue insns. */
record_insns (seq, &prologue);
- prologue_end = emit_note (NULL, NOTE_INSN_PROLOGUE_END);
+ prologue_end = emit_note (NOTE_INSN_PROLOGUE_END);
seq = get_insns ();
end_sequence ();
goto epilogue_done;
start_sequence ();
- epilogue_end = emit_note (NULL, NOTE_INSN_EPILOGUE_BEG);
+ epilogue_end = emit_note (NOTE_INSN_EPILOGUE_BEG);
seq = gen_epilogue ();
insn that can be used as an insertion point. */
map->insns_at_start = get_last_insn ();
if (map->insns_at_start == 0)
- map->insns_at_start = emit_note (NULL, NOTE_INSN_DELETED);
+ map->insns_at_start = emit_note (NOTE_INSN_DELETED);
map->regno_pointer_align = inl_f->emit->regno_pointer_align;
map->x_regno_reg_rtx = inl_f->emit->x_regno_reg_rtx;
This line number note is still needed for debugging though, so we can't
delete it. */
if (flag_test_coverage)
- emit_note (NULL, NOTE_INSN_REPEATED_LINE_NUMBER);
+ emit_note (NOTE_INSN_REPEATED_LINE_NUMBER);
emit_line_note (input_filename, input_line);
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_FUNCTION_BEG
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_DELETED)
{
- copy = emit_note (NULL, NOTE_LINE_NUMBER (insn));
+ copy = emit_note (NOTE_LINE_NUMBER (insn));
NOTE_DATA (copy) = NOTE_DATA (insn);
if ((NOTE_LINE_NUMBER (copy) == NOTE_INSN_BLOCK_BEG
|| NOTE_LINE_NUMBER (copy) == NOTE_INSN_BLOCK_END)
start_sequence ();
/* ??? change_stack needs some point to emit insns after. */
- after = emit_note (NULL, NOTE_INSN_DELETED);
+ after = emit_note (NOTE_INSN_DELETED);
tmpstack = regstack;
change_stack (after, &tmpstack, target_stack, EMIT_BEFORE);
/* Make sure that the last insn in the chain
is not something that needs reloading. */
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
/* Enable find_equiv_reg to distinguish insns made by reload. */
reload_first_uid = get_max_uid ();
extern rtx emit_label PARAMS ((rtx));
extern rtx emit_barrier PARAMS ((void));
extern rtx emit_line_note PARAMS ((const char *, int));
-extern rtx emit_note PARAMS ((const char *, int));
+extern rtx emit_note PARAMS ((int));
extern rtx emit_line_note_force PARAMS ((const char *, int));
extern rtx make_insn_raw PARAMS ((rtx));
extern void add_function_usage_to PARAMS ((rtx, rtx));
if (e->insns == NULL_RTX)
{
start_sequence ();
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
}
else
push_to_sequence (e->insns);
}
start_sequence ();
- start = emit_note (NULL, NOTE_INSN_BLOCK_BEG);
+ start = emit_note (NOTE_INSN_BLOCK_BEG);
if (cfun->x_whole_function_mode_p)
NOTE_BLOCK (start) = block;
- fixup->before_jump = emit_note (NULL, NOTE_INSN_DELETED);
- end = emit_note (NULL, NOTE_INSN_BLOCK_END);
+ fixup->before_jump = emit_note (NOTE_INSN_DELETED);
+ end = emit_note (NOTE_INSN_BLOCK_END);
if (cfun->x_whole_function_mode_p)
NOTE_BLOCK (end) = block;
fixup->context = block;
do_pending_stack_adjust ();
emit_queue ();
- emit_note (NULL, NOTE_INSN_LOOP_BEG);
+ emit_note (NOTE_INSN_LOOP_BEG);
emit_label (thisloop->data.loop.start_label);
return thisloop;
thisloop->next = loop_stack;
thisloop->all = nesting_stack;
thisloop->depth = ++nesting_depth;
- thisloop->data.loop.start_label = emit_note (NULL, NOTE_INSN_DELETED);
+ thisloop->data.loop.start_label = emit_note (NOTE_INSN_DELETED);
thisloop->data.loop.end_label = gen_label_rtx ();
thisloop->data.loop.continue_label = thisloop->data.loop.end_label;
thisloop->exit_label = thisloop->data.loop.end_label;
expand_loop_continue_here ()
{
do_pending_stack_adjust ();
- emit_note (NULL, NOTE_INSN_LOOP_CONT);
+ emit_note (NOTE_INSN_LOOP_CONT);
emit_label (loop_stack->data.loop.continue_label);
}
}
emit_jump (start_label);
- emit_note (NULL, NOTE_INSN_LOOP_END);
+ emit_note (NOTE_INSN_LOOP_END);
emit_label (loop_stack->data.loop.end_label);
POPSTACK (loop_stack);
if (flag_guess_branch_prob)
{
- note = emit_note (NULL, NOTE_INSN_PREDICTION);
+ note = emit_note (NOTE_INSN_PREDICTION);
NOTE_PREDICTION (note) = NOTE_PREDICT (PRED_CONTINUE, IS_TAKEN);
}
clear_last_expr ();
if (! expand_exit_loop_if_false (whichloop, cond))
return 0;
- emit_note (NULL, NOTE_INSN_LOOP_END_TOP_COND);
+ emit_note (NOTE_INSN_LOOP_END_TOP_COND);
return 1;
}
/* Emit information for branch prediction. */
rtx note;
- note = emit_note (NULL, NOTE_INSN_PREDICTION);
+ note = emit_note (NOTE_INSN_PREDICTION);
NOTE_PREDICTION (note) = NOTE_PREDICT (pred, NOT_TAKEN);
/* Create a note to mark the beginning of the block. */
if (block_flag)
{
- note = emit_note (NULL, NOTE_INSN_BLOCK_BEG);
+ note = emit_note (NOTE_INSN_BLOCK_BEG);
NOTE_BLOCK (note) = block;
}
else
- note = emit_note (NULL, NOTE_INSN_DELETED);
+ note = emit_note (NOTE_INSN_DELETED);
/* Make an entry on block_stack for the block we are entering. */
fix this is to just insert another instruction here, so that the
instructions inserted after the last unconditional cleanup are
never the last instruction. */
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
if (block_stack
&& !(block_stack->data.block.cleanups == NULL_TREE
if (mark_ends)
{
- rtx note = emit_note (NULL, NOTE_INSN_BLOCK_END);
+ rtx note = emit_note (NOTE_INSN_BLOCK_END);
NOTE_BLOCK (note) = NOTE_BLOCK (thisblock->data.block.first_insn);
}
else
fix this is to just insert another instruction here, so that the
instructions inserted after the last unconditional cleanup are
never the last instruction. */
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
}
}
return 1;
/* Make sure case_stmt.start points to something that won't
need any transformation before expand_end_case. */
if (GET_CODE (get_last_insn ()) != NOTE)
- emit_note (NULL, NOTE_INSN_DELETED);
+ emit_note (NOTE_INSN_DELETED);
thiscase->data.case_stmt.start = get_last_insn ();
|| (last_iteration
&& unroll_type != UNROLL_COMPLETELY)))
{
- copy = emit_note (NULL, NOTE_LINE_NUMBER (insn));
+ copy = emit_note (NOTE_LINE_NUMBER (insn));
NOTE_DATA (copy) = NOTE_DATA (insn);
}
else
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_VTOP
&& NOTE_LINE_NUMBER (insn) != NOTE_INSN_LOOP_CONT)
{
- rtx copy = emit_note (NULL, NOTE_LINE_NUMBER (insn));
+ rtx copy = emit_note (NOTE_LINE_NUMBER (insn));
NOTE_DATA (copy) = NOTE_DATA (insn);
}
}