[PATCH][AArch64][5/14] Make flag_omit_leaf_frame_pointer intialize to 2. Define and use TARGET_OMIT_LEAF_FRAME_POINTER

Kyrill Tkachov kyrylo.tkachov@arm.com
Tue Jul 21 10:31:00 GMT 2015


Hi James,

On 21/07/15 11:09, James Greenhalgh wrote:
> 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).

Ok, if that extra indirection is deemed superfluous I don't mind removing it.
Here's the much shorter version.
I'll commit it together with the rest of the series when appropriate.

Kyrill


2015-07-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/aarch64/aarch64.opt (momit-leaf-frame-pointer): Initialize
     flag_omit_leaf_frame_pointer to 2.

>
> 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.
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: aarch64-attrs-5.patch
Type: text/x-patch
Size: 774 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20150721/286941db/attachment.bin>


More information about the Gcc-patches mailing list