[patch] tree-cfg.c: Speed up cleanup_tree_cfg().

Diego Novillo dnovillo@redhat.com
Sat Oct 2 01:28:00 GMT 2004


On Fri, 2004-10-01 at 20:52, Giovanni Bajo wrote:
> Andrew MacLeod wrote:
> 
> > I'm willing to bet there are places where we slow down a release
> > compiler because we are performing a lot of assertions  we thought we
> > were only doing with ENABLE_CHECKING. I certainly have written some.
> > bah.
> 
> In the patches Nathan and I have been doing to convert GCC to gcc_assert, we
> always checked each and every abort line manually and used our own judgement
> about what is heavy and what is not. Of course, I can do (and probably have
> done) mistakes, but stay sure it was not a mechanical change.
> 
My concern is, actually, new code.  I was also under the impression that
gcc_assert was a nop in released compilers.  We should have a bigger
warning sign.  What may be today a cheap check, may silently become an
expensive one in the future (e.g., verify_ssa used to be fairly
lightweight).

I guess that a rule of thumb could be "no function calls in gcc_assert
without ENABLE_CHECKING guards".  I hope this is documented?


Diego.



More information about the Gcc-patches mailing list