This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 2/7]: Ping2: Merge from Stack Branch - collect alignment info
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Ye, Joey" <joey dot ye at intel dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Lu, Hongjiu" <hongjiu dot lu at intel dot com>, "Guo, Xuepeng" <xuepeng dot guo at intel dot com>, "Jan Hubicka" <hubicka at ucw dot cz>
- Date: Sun, 25 May 2008 16:37:12 +0200
- Subject: Re: [PATCH 2/7]: Ping2: Merge from Stack Branch - collect alignment info
- References: <BB577BF501703042AD7E08EADD8E514FF5DD47@pdsmsx415.ccr.corp.intel.com>
On Mon, May 19, 2008 at 11:33 AM, Ye, Joey <email@example.com> wrote:
> This update addresses your comments about caller alignment in
> OK for mainline?
+#define MAX_VECTORIZE_STACK_ALIGNMENT 0
+#define LOCAL_ALIGNMENT(TYPE, MODE, ALIGNMENT) ALIGNMENT
These both need documenting. I'm lost in the patch otherwise -- can you point
me to a mail with an overview of the whole picture, especially what this
MAX_VECTORIZE_STACK_ALIGNMENT is all about?
> 2008-05-19 Joey Ye <firstname.lastname@example.org>
> H.J. Lu <email@example.com>
> * builtins.c (expand_builtin_setjmp_receiver): Replace
> virtual_incoming_args_rtx with
> (expand_builtin_apply_args_1): Likewise.
> (expand_builtin_longjmp): DRAP will be needed if some builtins
> (expand_builtin_apply): Likewise.
> * calls.c (expand_call): Replace virtual_incoming_args_rtx with
> (emit_call_1): DRAP will be needed if return pops.
> * caller-save.c (setup_save_areas): Call assign_stack_local_1
> instead of assign_stack_local to allow alignment reduction.
> * rtl.h (assign_stack_local_1): Declare new funtion.
> * emit-rtl.c (gen_reg_rtx): Estimate stack alignment when
> virtual registers.
> * cfgexpand.c (get_decl_align_unit): Estimate stack variable
> alignment and store to stack_alignment_estimated and
> (expand_one_var): Likewise.
> (gate_handle_drap): Gate new pass pass_handle_drap.
> (handle_drap): New function.
> (tree_expand_cfg): Calls handle_drap at end. Initialize rtl_data
> * defaults.h (MAX_VECTORIZE_STACK_ALIGNMENT): New.
> * function.c (assign_stack_local_1): Estimate stack variable
> alignment and store to stack_alignment_estimated.
> (instantiate_new_reg): Instantiate virtual incoming args rtx to
> vDRAP if stack realignment and DRAP is needed.
> (assign_parms): Collect parameter/return type alignment and
> contribute to stack_alignment_estimated.
> (locate_and_pad_parm): Likewise.
> (allocate_struct_function): Init stack_alignment_estimated and
> (get_arg_pointer_save_area): Replace virtual_incoming_args_rtx
> with crtl->args.internal_arg_pointer.
> (LOCAL_ALIGNMENT): Removed.
> (get_stack_local_alignment): New.
> (assign_stack_local): Use it. Set alignment on stack slot.
> (assign_stack_temp_for_type): Use get_stack_local_alignment.
> * global.c (compute_regsets): Set need_fp cannot_elim
> wrt stack_realign_needed. Set frame_pointer_needed and
> * stmt.c (expand_nl_goto_receiver): Replace
> virtual_incoming_args_rtx with
> * tree-vectorizer.c (vect_can_force_dr_alignment_p): Return
> true if alignment of variable on stack is less than or
> equal to MAX_VECTORIZE_STACK_ALIGNMENT.
> * reload1.c (set_label_offsets): Assert that frame pointer must
> elimiated to stack pointer in case stack realignment is
> to happen without DRAP.
> (elimination_effects): Likewise.
> (eliminate_regs_in_insn): Likewise.
> (mark_not_eliminable): Likewise.
> (update_eliminables): Likewise.
> (init_elim_table): Don't set frame_pointer_needed here.