This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/6] Allow jumps in epilogues


On 04/13/2011 04:14 PM, Bernd Schmidt wrote:
> On 04/11/2011 07:10 PM, Richard Henderson wrote:
>> Ok.
> 
> Did you receive my reply to this message from earlier today? It doesn't
> seem to have made it to gcc-patches yet.

Since gcc-patches appears to have dropped the message, I'll resend it in
three parts.

There are three patches here, but they must be applied together (things
will mostly work otherwise, but I expect -freorder-blocks-and-partition
is broken in the intermediate stages). Below is the ChangeLog for the
entire set, and the first of the patches. This is just a new version of
the previously posted 002-scanfirst patch, now changed to delete the CFI
notes afterwards in order to avoid -fcompare-debug failures.


Bernd

	* target.def (dwarf_handle_frame_unspec): Remove label argument.
	* doc/tm.texi: Regenerate.
	* tree.h (dwarf2out_cfi_label, dwarf2out_def_cfa,
	dwarf2out_window_save, dwarf2out_reg_save, dwarf2out_return_save,
	dwarf2out_return_reg, dwarf2out_reg_save_reg): Don't declare.
	* final.c (final_start_function): Call
	dwarf2out_frame_debug_after_prologue.
	(final_scan_insn): Don't call dwarf2out_frame_debug for anything.
	Handle NOTE_INSN_CFI and NOTE_INSN_CFI_LABEL.
	(final): Delete these notes.
	* insn-notes.def (CFI, CFI_LABEL): New.
	* jump.c (addr_vec_p): New function.
	* dwarf2out.c (cfi_insn): New static variable.
	(dwarf2out_cfi_label): Remove force argument. All callers changed.
	Only generate the label, don't emit it.
	(dwarf2out_maybe_emit_cfi_label): New function.
	
	(add_fde_cfi): Remove label argument.  All callers changed.  Remove
	most code; leave a condition to either emit a CFI insn, or add the
	CFI to the FDE CFI vector.
	(add_cie_cfi): New static function.
	(add_cfi): Remove function.
	(old_cfa): New static variable.
	(cfa_remember): Remove static variable.
	(dwarf2out_def_cfa): Replace label argument with a bool for_cie
	argument.  All callers changed.  Don't use lookup_cfa; use and
	update the global old_cfa variable.  Call add_fde_cfi or add_cie_cfi
	at the end.
	(reg_save): Replace label argument with a bool.  All callers changed.
	Call add_fde_cfi or add_cie_cfi at the end.
	(dwarf2out_reg_save, dwarf2out_return_save, dwarf2out_return_reg,
	dwarf2out_args_szie, dwarf2out_stack_adjust, dwarf2out_reg_save_reg,
	dwarf2out_frame_debug_def_cfa, dwarf2out_frame_debug_cfa_offset,
	dwarf2out_frame_debug_cfa_register, dwarf2out_frame_debug_cfa_restore,
	dwarf2out_frame_debug_cfa_expression, dwarf2out_frame_debug_expr):
	Remove label argument.  All callers changed.
	(barrier_args_size): Remove variable.
	(compute_barrier_args_size_1, compute_barrier_args_size): Remove
	functions.
	(dwarf2out_notice_stack_adjust): Don't handle barriers.
	(last_reg_save_label): Remove variable.  All sets and uses removed.
	(cfi_label_required_p, add_cfis_to_fde): New static functions.
	(dwarf2out_frame_debug_restore_state): Simply add the new CFI.
	(dwarf2out_frame_debug): Set cfi_insn, and clear it.  Don't call
	dwarf2out_flush_queued_reg_saves at the top.
	(dwarf2out_frame_debug_init): Initialize old_cfa.
	(copy_cfi_vec_parts): New static function.
	(jump_target_info): New struct type.
	(dwarf2out_cfi_begin_epilogue): Remove.
	(save_point_p, record_current_state, maybe_record_jump_target,
	vec_is_prefix_of, append_extra_cfis, debug_cfi_vec, switch_note_p,
	scan_until_barrier, find_best_starting_point): New static functions.
	(dwarf2out_frame_debug_after_prologue): New function.
	(dwarf2out_emit_cfi): New function.
	(output_cfi_directive): New FILE argument.  All callers changed.
	Avoid some paths if it is not asm_out_file; otherwise print to it.
	(output_all_cfis): Remove function.
	(output_cfis): Remove do_cfi_asm arg.  All callers changed.  Never
	call output_cfi_directive.
	(dwarf2out_frame_init): Initialize old_cfa.
	(dwarf2out_switch_text_section): Don't initialize dw_fde_current_label.
	Don't call output_all_cfis.
	* dwarf2out.h (dwarf2out_cfi_label, dwarf2out_def_cfa,
	dwarf2out_window_save, dwarf2out_reg_save, dwarf2out_return_save,
	dwarf2out_return_reg, dwarf2out_reg_save_reg, dwarf2out_emit_cfi,
	dwarf2out_frame_debug_after_prologue): Declare.
	(dwarf2out_cfi_begin_epilogue, dwarf2out_frame_debug_restore_state):
	Don't declare.
	(struct dw_cfi_struct): Add forward declaration.
	* rtl.h (union rtunion_def): Add rt_cfi member.
	(XCFI, XCCFI, NOTE_CFI, NOTE_LABEL_NUMBER): New macros.
	(addr_vec_p): Declare.
	* config/sparc/sparc.c (sparc_dwarf_handle_frame_unspec): Remove
	label argument.
	* config/ia64/ia64.c (ia64_dwarf_handle_frame_unspec): Likewise.
	* config/arm/arm.c (thumb_pushpop): Use dwarf2out_maybe_emit_cfi_label
	rather than dwarf2out_cfi_label.
	(thumb1_output_function_prologue): Likewise.
	(arm_dwarf_handle_frame_unspec): Remove label argument.

Attachment: 005-scanfirst.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]