I've created a new branch ira-select for work on experimental
algorithm of calculations of pseudo register classes.

The current algorithm in IRA (file ira-costs.c) was adopted from old
regclass.c.  It has a big disadvantage which is in ignoring a fact
that operands should be in the same alternative when we calculate reg
class costs for an insn pseudos.

The new algorithm is based on choosing insn alternative and then
calculation of pseudo reg class costs knowing the alternative.  As the
current algorithm the new one is a two pass algorithm. On the second
pass we use pseudo reg classes chosen on the first pass to choose
again an insn alternative better and calculate reg class costs more
accurately.  A special treatment of pseudo move insns is done as they
have too many possible alternatives.

In some way the new algorithm can be considered as a more explicit
early code selection than the current algorithm is (the final code
selection in GCC is actually done in LRA).

On the branch the new algorithm is switched on by default.  To switch
it off, use option -fno-ira-select.

Currently, the new algorithm improves x86-64 SPECINT2000 by 0.5% and
speed up the compiler on it by 1%.  Still there are some problems with
code.  They are a bigger code for SPECFP2000 and some failures on GCC
testsuite (unexpected code generation).

This code is experimental, the work is not finished yet (I publish
this code as I promised to show it to some people on last Cauldron).
The code might become a part of GCC8 if it works well for variety of
targets.

Reply via email to