From ddc5a1dfbd293763de09ec27e6e650d185bbabd4 Mon Sep 17 00:00:00 2001 From: jakub Date: Mon, 19 Feb 2018 21:58:04 +0000 Subject: PR target/84146 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note. * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove. * var-tracking.c (emit_note_insn_var_location): Remove all references to NOTE_INSN_CALL_ARG_LOCATION. (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note. Use copy_rtx_if_shared. * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note. (dwarf2out_var_location): Remove handling of NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note on call_insn. * final.c (final_scan_insn): Remove all references to NOTE_INSN_CALL_ARG_LOCATION. (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes before dumping final insns. * except.c (emit_note_eh_region_end): Remove all references to NOTE_INSN_CALL_ARG_LOCATION. * config/alpha/alpha.c (alpha_pad_function_end): Likewise. * config/c6x/c6x.c (c6x_gen_bundles): Likewise. * config/arc/arc.c (hwloop_optimize): Likewise. * config/arm/arm.c (create_fix_barrier): Likewise. * config/s390/s390.c (s390_chunkify_start): Likewise. * config/sh/sh.c (find_barrier): Likewise. * config/i386/i386.c (rest_of_insert_endbranch, ix86_seh_fixup_eh_fallthru): Likewise. * config/xtensa/xtensa.c (hwloop_optimize): Likewise. * config/iq2000/iq2000.c (final_prescan_insn): Likewise. * config/frv/frv.c (frv_function_prologue): Likewise. * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION reg note. (note_outside_basic_block_p): Remove all references to NOTE_INSN_CALL_ARG_LOCATION. * gengtype.c (adjust_field_rtx_def): Likewise. * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn): Likewise. * jump.c (cleanup_barriers, delete_related_insns): Likewise. * cfgrtl.c (force_nonfallthru_and_redirect): Likewise. * gcc.target/i386/pr84146.c: Add -fcompare-debug to dg-options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@257826 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/dwarf2out.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'gcc/dwarf2out.c') diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4e2bf3b4c88..5e88c7bacf0 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -23110,7 +23110,7 @@ gen_subprogram_die (tree decl, dw_die_ref context_die) rtx arg, next_arg; for (arg = (ca_loc->call_arg_loc_note != NULL_RTX - ? NOTE_VAR_LOCATION (ca_loc->call_arg_loc_note) + ? XEXP (ca_loc->call_arg_loc_note, 0) : NULL_RTX); arg; arg = next_arg) { @@ -26975,6 +26975,17 @@ dwarf2out_var_location (rtx_insn *loc_note) call_site_count++; if (SIBLING_CALL_P (loc_note)) tail_call_site_count++; + if (find_reg_note (loc_note, REG_CALL_ARG_LOCATION, NULL_RTX)) + { + call_insn = loc_note; + loc_note = NULL; + var_loc_p = false; + + next_real = dwarf2out_next_real_insn (call_insn); + next_note = NULL; + cached_next_real_insn = NULL; + goto create_label; + } if (optimize == 0 && !flag_var_tracking) { /* When the var-tracking pass is not running, there is no note @@ -27034,8 +27045,7 @@ dwarf2out_var_location (rtx_insn *loc_note) || ! NOTE_P (next_note) || (NOTE_KIND (next_note) != NOTE_INSN_VAR_LOCATION && NOTE_KIND (next_note) != NOTE_INSN_BEGIN_STMT - && NOTE_KIND (next_note) != NOTE_INSN_INLINE_ENTRY - && NOTE_KIND (next_note) != NOTE_INSN_CALL_ARG_LOCATION)) + && NOTE_KIND (next_note) != NOTE_INSN_INLINE_ENTRY)) next_note = NULL; if (! next_real) @@ -27145,10 +27155,10 @@ create_label: { struct call_arg_loc_node *ca_loc = ggc_cleared_alloc (); - rtx_insn *prev - = loc_note != NULL_RTX ? prev_real_insn (loc_note) : call_insn; + rtx_insn *prev = call_insn; - ca_loc->call_arg_loc_note = loc_note; + ca_loc->call_arg_loc_note + = find_reg_note (call_insn, REG_CALL_ARG_LOCATION, NULL_RTX); ca_loc->next = NULL; ca_loc->label = last_label; gcc_assert (prev -- cgit v1.2.1