This is the mail archive of the 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: Remove timevar_get ()

On Nov 3, 2004, at 8:08 PM, Ben Elliston wrote:

Andrew Pinski <> writes:

This is unrelated to your current patch series, but currently the
first thing timevar_push/pop/start/stop do is check the global
variable timevar_enable, and if it's false, they return.  It would be
more efficient if this check happened in their callers.  To do that,
timevar_enable needs to be globally visible, and those four functions
need to be shadowed by macros which just do if (timevar_enable) call
real function;.

Would you be willing to make that change?

I had that change but you rejected it because I could not show it improved that much.

Do you still have the patch, Andrew, or shall I recreate it?

I still have it and I just bootstrapped with it last night on i686-pc-linux-gnu with no regressions.


Andrew Pinski

        * timevar.c (timevar_enable): Change from
        (timevar_push): Rename to ...
        (timevar_push_1): this and remove the
        enabled check.
        (timevar_pop): Rename to ...
        (timevar_pop_1): this and remove the
        enabled check.
        * timevar.h (POP_TIMEVAR_AND_RETURN): Use do/while loops.
        (timevar_pop): New macro.
        (timevar_push): New macro.
        (timevar_enable): Declare.

Attachment: temp.diff.txt
Description: Text document

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