ivopts cost oddities

Bernd Schmidt bernds_cb1@t-online.de
Mon Nov 20 13:28:00 GMT 2006


Bernd Schmidt wrote:
> Tracing through the code trying to find where the costs are generated, I
> found that get_addresses gets called with an out-of-bounds constant, and
> symbol_present == var_present == 0 and ratio == 1.  This case falls into
> a small if statement which uses the cost of a Pmode addition as a base
> cost, which is sensible, but also sets var_present to 1, which is not.
> It causes us to additionally add the cost of a reg+reg addition, leading
> to an exaggerated cost for using the original biv and causes us to
> create additional ones until the register pressure heuristics kick in.

After retesting everything I've now committed the final patch to fix the
problem described above.  As mentioned earlier in the thread, while this
fixes a bug and leads to better code generation on the Blackfin, it may
cause regressions on other targets where the previous code may have done
the right thing by accident.  Since we're in stage1, there ought to be
enough time to identify and fix such problems.

Bootstrapped, regression tested on i686-linux; committed as 119014.


Bernd



More information about the Gcc-patches mailing list