Remove timevar_get ()

Andrew Pinski pinskia@physics.uc.edu
Thu Nov 4 01:16:00 GMT 2004


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

> Andrew Pinski <pinskia@physics.uc.edu> 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.

OK?

Thanks,
Andrew Pinski

ChangeLog:
         * timevar.c (timevar_enable): Change from
         static.
         (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.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: temp.diff.txt
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20041104/7f6b3a44/attachment.txt>


More information about the Gcc-patches mailing list