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][AArch64][5/14] Make flag_omit_leaf_frame_pointer intialize to 2. Define and use TARGET_OMIT_LEAF_FRAME_POINTER


On Thu, Jul 16, 2015 at 04:20:45PM +0100, Kyrill Tkachov wrote:
> Hi all,
> 
> This patch wraps aarch64_frame_pointer_required into a TARGET_OMIT_LEAF_FRAME_POINTER macro
> and initializes aarch64_frame_pointer_required to 2 instead of 1, allowing us to detect from
> aarch64_frame_pointer_required whether the user explicitly specified -momit-leaf-frame-pointer
> or -mno-omit-leaf-frame-pointer. No functional changes in this patch.
> 
> Bootstrapped and tested as part of series on aarch64.
> 
> Ok for trunk?

I'm not sure the new macro adds much to this patch really, and it is just
one more layer of indirection to look through when I want to understand
the code. It seems to me that we can drop all the hunks except this one:

> diff --git a/gcc/config/aarch64/aarch64.opt b/gcc/config/aarch64/aarch64.opt
> index c9c0aff..e29d606 100644
> --- a/gcc/config/aarch64/aarch64.opt
> +++ b/gcc/config/aarch64/aarch64.opt
> @@ -77,7 +77,7 @@ Target Report RejectNegative Mask(STRICT_ALIGN)
>  Don't assume that unaligned accesses are handled by the system
>  
>  momit-leaf-frame-pointer
> -Target Report Save Var(flag_omit_leaf_frame_pointer) Init(1)
> +Target Report Save Var(flag_omit_leaf_frame_pointer) Init(2)
>  Omit the frame pointer in leaf functions
>  
>  mtls-dialect=

So, OK for that part and please drop the rest (and update the ChangeLog
accordingly).

Thanks,
James


> 2015-07-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
> 
>      * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize
>      flag_omit_leaf_frame_pointer to 2.
>      * config/aarch64/aarch64.h (TARGET_OMIT_LEAF_FRAME_POINTER): New macro.
>      * config/aarch64.aarch64.c (aarch64_frame_pointer_required): Use above.
>      (aarch64_can_eliminate): Likewise.



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