[PATCH] Introduce TV_INITIALIZE_RTL
Jeff Law
law@redhat.com
Thu May 14 17:47:00 GMT 2015
On 05/14/2015 10:29 AM, David Malcolm wrote:
> Before this patch, jit.dg/test-benchmark.c at optlevel 0, 100 iterations
> showed "rest of compilation" as taking a significant chunk of time:
>
> rest of compilation : 1.53 (64%) usr 0.06 (32%) sys 1.60 (27%) wall 1388 kB ( 6%) ggc
>
> This turned out to be almost entirely spent inside initialize_rtl; adding a
> TV_INITIALIZE_RTL for this indicates this cost clearly:
>
> initialize rtl : 1.46 (61%) usr 0.01 ( 5%) sys 1.42 (24%) wall 1156 kB ( 5%) ggc
> rest of compilation : 0.05 ( 2%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 232 kB ( 1%) ggc
>
> I'm experimenting with a followup patch to amortize this away by making RTL
> initialization a one-time deal, but in the meantime, this patch adds
> accounting for it.
>
> OK for trunk? (assuming bootstrap and testing)
>
> gcc/ChangeLog:
> * timevar.def (TV_INITIALIZE_RTL): New.
> * toplev.c (initialize_rtl): Use an auto_timevar to account this
> function's time to TV_INITIALIZE_RTL.
We should done this a long time ago -- initialization/startup items are
a real issue.
OK.
jeff
More information about the Gcc-patches
mailing list