This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Patrick Palka <patrick at parcs dot ath dot cx>
- Cc: kugan <kugan dot vivekanandarajah at linaro dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 24 Jul 2016 10:56:46 -0700
- Subject: Re: [PATCH] Teach VRP to register assertions along default switch labels (PR 18046)
- Authentication-results: sourceware.org; auth=none
- References: <20160722192630.23771-1-patrick@parcs.ath.cx> <42d63e4e-d922-ca81-1466-400e073b1d7d@linaro.org> <CA+C-WL89DAjKTZekaGwL0cjURLrXpEGskh5ORho=y8nFA1_+yw@mail.gmail.com>
On Sun, Jul 24, 2016 at 9:49 AM, Patrick Palka <patrick@parcs.ath.cx> wrote:
> On Sat, Jul 23, 2016 at 9:13 PM, kugan
> <kugan.vivekanandarajah@linaro.org> wrote:
>>
>>
>> On 23/07/16 05:26, Patrick Palka wrote:
>>>
>>> This patch teaches VRP to register along a default switch label
>>> assertions that corresponds to the anti range of each case label.
>>
>>
>> Hi Patrick,
>>
>> In case of a larger switch statement with case values that cannot be
>> combined, you could end up with very large number of ASSERT_EXPRs in the
>> default basic block. I am not sure if this would have any impact on compile
>> time/memory usage? If that is the case you might want to punt at some
>> length?
>
> Hi Kugan,
>
> That sounds like a good idea to me. So I gathered some info about the
> number of assert_exprs inserted in the default bb during GCC bootstrap
> with this patch:
>
> Max # of asserts inserted in a default BB: 59
> Median #: 2
> Average #: 3.33817
> Std. dev: 4.76926
> 95% percentile: 10
>
> Based on the last point I guess 10 would be a good limit?
>
Make sure this is a parameter so someone can increase it if they want.
But 10 seems like a good default.
Thanks,
Andrew Pinski
>>
>> Thanks,
>> Kugan