[PATCH] Wrap 'expand_all_functions' and 'ipa_passes' around timevars
Richard Biener
richard.guenther@gmail.com
Mon Jan 28 15:33:00 GMT 2019
On Mon, Jan 28, 2019 at 2:16 PM Giuliano Belinassi
<giuliano.belinassi@usp.br> wrote:
>
> On 01/28, Richard Biener wrote:
> > On Thu, Jan 24, 2019 at 8:51 PM Giuliano Belinassi
> > <giuliano.belinassi@usp.br> wrote:
> > >
> > > This patch adds two variables named 'TV_CGRAPH_FUNC_EXPANSION' and
> > > 'TV_CGRAPH_IPA_PASSES' that count the elapsed time of the functions
> > > 'expand_all_functions' and 'ipa_passes', respectivelly.
> > >
> > > The main point of this is that these functions takes a very long time
> > > when compiling the 'gimple-match.c' file, and therefore may also take
> > > a long time when compiling other large files.
> >
> > But as implemented those shouldn't accumulate a lot of time because other
> > timevars are pushed for them.
> >
>
> It seems not to be what is happening. For instance:
>
> callgraph functions expansion : 49.42 ( 73%) 1.18 ( 29%) 50.60 ( 70%) 770140 kB ( 48%)
> callgraph ipa passes : 13.10 ( 19%) 1.47 ( 36%) 14.57 ( 20%) 388727 kB ( 24%)
>
> I also tried push/pop'ing these variables, however the reported time
> was 0
>
> > I think you want to instead split TV_PHASE_OPT_GEN into
> > TV_PHASE_OPT_GIMPLE TV_PHASE_IPA and TV_PHASE_RTL
> > which probably can be easiest managed by the pass manager
> > pushing/popping those appropriately depending on the pass kind
> > that is invoked?
> >
> I will check this out.
> Just a question: Is the function expansion a part of GIMPLE?
It covers both GIMPLE and RTL I think (maybe also parts of IPA).
Richard.
> Giuliano.
>
> > Richard.
> >
> > > I also accept suggestions about how to improve this :-)
> > >
> > > ChangeLog:
> > >
> > > 2019-01-24 Giuliano Belinassi <giuliano.belinassi@usp.br>
> > >
> > > * cgraph_unit.c (compile): TV_CGRAPH_FUNC_EXPANSION and
> > > TV_CGRAPH_IPA_PASSES start, stop.
> > > * timevar.def (TV_CGRAPH_IPA_PASSES, TV_CGRAPH_FUNC_EXPANSION): New.
> > >
> > >
More information about the Gcc-patches
mailing list