This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: pervasive SSE codegen inefficiency


Daniel Berlin <dberlin@dberlin.org> wrote:

> For example, Kenny and I discovered during his prespilling work that the
> liveness is actually calculated wrong.
>
> It's half-forwards (local), half-backwards (globally), instead of all
> backwards, which is how liveness is normally calculated, so we
> discovered that spilling registers wasn't actually changing the liveness
> calculation due to the forwardness.

I believe another short term project that could be done is to prepare a good
test infrastructure for RTL passes.

Currently, tree passes get away with checking their own dumps, and or
scanning the resulting code after the pass. This is not "perfect" but it is
surely good "enough". Instead, in RTL world, there are absolutely *no* unit
tests, if we exclude some backend-specific pass (e.g. check "cmov" is
generated in final assembly listing).

Making an example out of Daniel's and Kenny's work, there is no way to test
that liveness is calculated correctly. Or that it is correctly updated after
prespilling. I'm not suprised that it turned out that spilling a register
didn't change liveness, since there is no test for it. Also, I would not be
surprised if 10 days after Kenny and Danny commit their work, someone else
manages to break it again with a stupid typo somewhere, and nobody notices
it for another 3-4 years.

For instance, I remember Joern writing a simple reload unit-test module: it
was a file that was able to setup reload, feed it with some hand-crafed RTL,
and check if the output RTL was as expected. It was SH-only and incomplete,
but it would be a good start. I don't think we can make much progress with
RA, if people can break other people's work without even noticing.

Another example could be Paolo's recent fwprop pass: it will be committed
without a way to test that it is actually working. Now think if there was a
way to feeds it with some RTL and check the generated output. That'd be
useful!
-- 
Giovanni Bajo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]