[PATCH] Exploiting dual mode operation, implementation.

Roger Sayle roger@eyesopen.com
Mon Jun 27 01:51:00 GMT 2005


Hi Leehood,

On Wed, 22 Jun 2005, Steven Bosscher wrote:
> First of all, I think you should submit the simplify_binary_operation_1
> and the combine_simplify_rtx parts as a separate patch.   It looks OK
> (to me at least ;-), it can probably go in by itself while people are
> discussing this pass.  Just ping Roger Sayle ;-)

Hehe, that stevenb knows me too well! :)  Yes, I'd prefer it if these
two RTL simplification bits were submitted separately.  I'm also not
a huge fan of exporting make_compound_operation from combine.c, and
would much prefer that the pattern matching in simplify_subreg and
simplify_binary_operation were instead enhanced to recognize the
sign_exten RTL sequences you're seeing.  Unfortunately, you don't
describe the patterns you've encountered and how/why calling
make_compound_operation helps, but I can guess that on targets without
sign extension operations, the "(x<<c) >> c" sequences aren't getting
simplified as well as they should.

The benefits of matching these trees explicitly is that we avoid the
overhead of the temporary RTL created by make_compound_operation, which
is often not needed, and improving simplify_subreg helps significantly
more of the compiler than just tweaking part of the combine pass.


I'm still reading through Steven B's review, but at first glance I also
agree with his comments on your changes to GCSE, that its probably
better to simply perform another GCSE pass than attempt to mess around
with want_to_gcse_p.


More generally, patches of this size and complexity really need much
more description than is often currently presented.  This applies not
only to this and the IBM Haifa patches still awaiting review,  but
many of the large GCC changes that frequently go uncommented upon.  As
strongly recommended in http://gcc.gnu.org/contribute.html it *really*
is much better submit independent bits separately.  It's far easier
to get four or five smaller patches reviewed and approved, than one
or two mega-passes.


Roger
--



More information about the Gcc-patches mailing list