diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-08 19:35:54 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-06-08 19:35:54 +0000 |
commit | 13751393a75659e694d83f5c9966455ff08899a2 (patch) | |
tree | 852a6d09fbb544c05a647e6acf28fdbf9741a19d /gcc/function.c | |
parent | 77e0f75a54702460f2c7f548368e9d37a9fe9b59 (diff) | |
download | gcc-13751393a75659e694d83f5c9966455ff08899a2.tar.gz |
* cfglayout.c (insn_scope): New static function
(block_locators_*, line_locators*, file_locators*): New static varrays.
(scope_to_insns_initialize): Use them.
(insn_line, insn_file): New functions.
(scope_to_insns_finalize): Use insn_scope.
(prologue_locator, epilogue_locator): New global variables.
* emit-rt.c (try_split, make_insn_raw, make_jump_insn_raw,
make_call_insn_raw, emit_copy_of_insn_after): Use locators.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
use locators.
* final.c (notice_source_line): Use locators.
(final_start_function): Set initial source file and line.
(final_scan_insn): Use locators.
* ifcvt.c (noce_try_store_flag, noce_try_store_flag_constants,
noce_try_addcc, noce_try_store_flag_mask, noce_try_cmove,
noce_try_cmove_arith, noce_try_minmax, noce_try_abs,
noce_process_if_block, find_cond_trap): Likewise.
* integrate.c (copy_insn_list): Likewise.
* jump.c (duplicate_loop_exit_test): LIkewise.
* print-rtl.c (print_rtx): Print locators.
* recog.c (peephole2_optimize): Likewise.
* rtl.h (INSN_SCOPE): Remove.
(emit_insn_after_scope, emit_insn_before_scope
emit_jump_insn_after_scope, emit_jump_insn_before_scope
emit_call_insn_after_scope, emit_call_insn_before_scope): Rename to...
(emit_insn_after_setloc, emit_insn_before_setloc
emit_jump_insn_after_setloc, emit_jump_insn_before_setloc
emit_call_insn_after_setloc, emit_call_insn_before_setloc): ... these;
(insn_file, insn_line, prologue_locator, epilogue_locator): Declare.
* unroll.c (copy_loop_body): Use locators.
* function.c (set_insn_locators): New function.
(thread_prologue_and_epilogue_insns): Set the locators accordingly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67637 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c index 9924bb589b7..e59bf6a954c 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -300,6 +300,7 @@ static void do_clobber_return_reg PARAMS ((rtx, void *)); static void do_use_return_reg PARAMS ((rtx, void *)); static void instantiate_virtual_regs_lossage PARAMS ((rtx)); static tree split_complex_args (tree); +static void set_insn_locators (rtx, int); /* Pointer to chain of `struct function' for containing functions. */ static GTY(()) struct function *outer_function_chain; @@ -7348,6 +7349,20 @@ record_insns (insns, vecp) } } +/* Set the specified locator to the insn chain. */ +static void +set_insn_locators (insn, loc) + rtx insn; + int loc; +{ + while (insn != NULL_RTX) + { + if (INSN_P (insn)) + INSN_LOCATOR (insn) = loc; + insn = NEXT_INSN (insn); + } +} + /* Determine how many INSN_UIDs in VEC are part of INSN. Because we can be running after reorg, SEQUENCE rtl is possible. */ @@ -7754,6 +7769,7 @@ thread_prologue_and_epilogue_insns (f) seq = get_insns (); end_sequence (); + set_insn_locators (seq, prologue_locator); /* Can't deal with multiple successors of the entry block at the moment. Function should always have at least one @@ -7901,6 +7917,7 @@ thread_prologue_and_epilogue_insns (f) /* Retain a map of the epilogue insns. */ record_insns (seq, &epilogue); + set_insn_locators (seq, epilogue_locator); seq = get_insns (); end_sequence (); @@ -7936,6 +7953,7 @@ epilogue_done: avoid getting rid of sibcall epilogue insns. Do this before we actually emit the sequence. */ record_insns (seq, &sibcall_epilogue); + set_insn_locators (seq, epilogue_locator); i = PREV_INSN (insn); newinsn = emit_insn_before (seq, insn); |