Less draconian decision in gcse.c?

David Edelsohn dje@watson.ibm.com
Tue Jun 6 20:12:00 GMT 2000

>>>>> Brad Lucier writes:

Brad> How difficult would it be to do gcse analysis across all edges except
Brad> those edges out of a computed goto?  Can one set up the usual analysis with
Brad> a restricted flow graph that does not include these edges, but does contain
Brad> all other edges?

	I am sure that if you submitted a patch with a more appropriate
and useful heuristic, it would be considered.  The current test was added
because of earlier problems; I am sure that it can be fine tuned.  If you
are interested, you should try to find an appropriate test that balances
the cost of performing the optimization versus the resulting benefit.

	The current test is trying to exclude functions for which gcse
will take a long time without much benefit.  Maybe the heuristic should be
varied with -O3 versus -O2.  Maybe there should be some switch equivalent
to -funroll-all-loops, e.g., -fgcse-all-functions.  Or -fgcse-threshold.
It is hard to satisfy everyone and compile time is important as well.


More information about the Gcc mailing list