This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][ARM] Add debug dumping of cost table fields
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Andrew Pinski <pinskia at gmail dot com>
- Cc: Kyrill Tkachov <kyrylo dot tkachov at arm dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Ramana Radhakrishnan <Ramana dot Radhakrishnan at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Wed, 27 May 2015 16:47:41 +0800
- Subject: Re: [PATCH][ARM] Add debug dumping of cost table fields
- Authentication-results: sourceware.org; auth=none
- References: <55438E3F dot 8050205 at arm dot com> <55658268 dot 7020403 at arm dot com> <CA+=Sn1nup6kAQUNrU0+a6Kg4u=wEiGRp_MXhaM9HAdXMExwZaw at mail dot gmail dot com>
On Wed, May 27, 2015 at 4:39 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> On Wed, May 27, 2015 at 4:38 PM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>> Ping.
>> https://gcc.gnu.org/ml/gcc-patches/2015-05/msg00054.html
>
> This and the one in AARCH64 is too noisy. Can we have an option to
> turn this on and default to turning them off.
Agreed. Actually I once file a PR about this enormous dump
information in gimple dumps.
Thanks,
bin
>
> Thanks,
> Andrew
>
>>
>> Thanks,
>> Kyrill
>>
>> On 01/05/15 15:31, Kyrill Tkachov wrote:
>>>
>>> Hi all,
>>>
>>> This patch adds a macro to wrap cost field accesses into a helpful debug
>>> dump,
>>> saying which field is being accessed at what line and with what values.
>>> This helped me track down cases where the costs were doing the wrong thing
>>> by allowing me to see which path in arm_new_rtx_costs was taken.
>>> For example, the combine log might now contain:
>>>
>>> Trying 2 -> 6:
>>> Successfully matched this instruction:
>>> (set (reg:SI 115 [ D.5348 ])
>>> (neg:SI (reg:SI 0 r0 [ a ])))
>>> using extra_cost->alu.arith with cost 0 from line 10506
>>>
>>> which can be useful in debugging the rtx costs.
>>>
>>> Bootstrapped and tested on arm.
>>>
>>> Ok for trunk?
>>>
>>> Thanks,
>>> Kyrill
>>>
>>>
>>> 2015-05-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>>>
>>> * config/arm/arm.c (DBG_COST): New macro.
>>> (arm_new_rtx_costs): Use above.
>>
>>