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] Teach VRP to register assertions along default switch labels (PR 18046)


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?

>
> Thanks,
> Kugan


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