NDEBUG-like macro

Jim Wilson wilson@cygnus.com
Fri Apr 17 19:41:00 GMT 1998


Since we often compile the first stage of gcc without optimization, such 
checking may not be entirely without cost, depending on how you implement
it.  If you add checks expecting that the optimizer will trivially remove
them, then we may find that bootstrapping takes longer on some platforms.
We also need to be careful that the debugging checks themselves don't
confuse the code to the point of making it harder to debug.  I don't think
either problem is serious though.

Besides checking of trees, we could also do some useful things with RTL
consistency checking between optimization passes.

For instance, it would be nice to have some code that verifies that all
of the REG_DEAD notes are correct.  This would make it easy to find places
that aren't handling them correctly when rewriting insns.  We could also
be consistency checking the reg_n_info variables.

While we are still using obstacks, it might be useful to have code to verify
that all of the RTL for a function is on the right obstack.  This matters
particularly for inline functions that get deferred.

We could be checking for invalidly shared RTL.

Jim



More information about the Gcc mailing list