[PATCH] var-tracking.c speedups
Richard Guenther
richard.guenther@gmail.com
Tue Jun 23 15:25:00 GMT 2009
On Tue, Jun 23, 2009 at 4:08 PM, Jakub Jelinek<jakub@redhat.com> wrote:
> On Tue, Jun 23, 2009 at 03:30:52PM +0200, Richard Guenther wrote:
>> The rtl.c parts are ok if you add a warning comment to both
>> rtx_equal_p and rtx_equal_cb_p that they should be kept in sync.
>
> Ok, will do.
>
>> Is it worth having the vui static buffer _and_ an allocated variant?
>> Why not just unconditionally use the allocated variant?
>
> The cost is
> static struct variable_union_info vui_buf[16];
> ...
> if (src_l + dst_l <= (int) ARRAY_SIZE (vui_buf))
> vui = vui_buf;
> else
> {
> ...
> }
> i.e. 6 lines, for something that will avoid the malloc for 100% of
> cases during gcc bootstrap and at least 99.9% for other projects as well
> seems worth to me, but if you think 6 lines are too much for that...
It's one malloc per compiled function, right? In which case I
would say it is at least premature optimization ...
I'll leave it up to you.
Thanks,
Richard.
> Jakub
>
More information about the Gcc-patches
mailing list