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 2/7]: Ping2: Merge from Stack Branch - collect alignment info


On Mon, May 19, 2008 at 11:33 AM, Ye, Joey <joey.ye@intel.com> wrote:
> Jan,
>
> This update addresses your comments about caller alignment in
> http://gcc.gnu.org/ml/gcc-patches/2008-04/msg02194.html
>
> OK for mainline?

+#ifndef MAX_VECTORIZE_STACK_ALIGNMENT
+#define MAX_VECTORIZE_STACK_ALIGNMENT 0
+#endif
+
+#ifndef LOCAL_ALIGNMENT
+#define LOCAL_ALIGNMENT(TYPE, MODE, ALIGNMENT) ALIGNMENT
+#endif
+

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?

Thanks,
Richard.


> 2008-05-19  Joey Ye  <joey.ye@intel.com>
>            H.J. Lu  <hongjiu.lu@intel.com>
>
>        * builtins.c (expand_builtin_setjmp_receiver): Replace
>        virtual_incoming_args_rtx with
>        crtl->args.internal_arg_pointer.
>        (expand_builtin_apply_args_1): Likewise.
>        (expand_builtin_longjmp): DRAP will be needed if some builtins
> are
>        called.
>        (expand_builtin_apply): Likewise.
>
>        * calls.c (expand_call): Replace virtual_incoming_args_rtx with
>        crtl->args.internal_arg_pointer.
>        (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
> generating
>        virtual registers.
>
>        * cfgexpand.c (get_decl_align_unit): Estimate stack variable
>        alignment and store to stack_alignment_estimated and
>        stack_alignment_used.
>        (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
>        fields.
>
>        * 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
>        stack_alignment_used.
>        (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
>        frame_pointer_needed_set.
>
>
>        * stmt.c (expand_nl_goto_receiver): Replace
>        virtual_incoming_args_rtx with
>        crtl->args.internal_arg_pointer.
>
>        * 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
> be
>        elimiated to stack pointer in case stack realignment is
> estimated
>        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.
>


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