This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5] Better support for widening multiplies
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Bernd Schmidt <bernds_cb1 at t-online dot de>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 16 Feb 2009 20:37:48 +0000
- Subject: Re: [4.5] Better support for widening multiplies
- References: <4999B411.6010902@t-online.de>
Bernd Schmidt wrote:
> The Blackfin profits a lot from being able to use widening 16x16->32 bit
> multiplications rather than extending the operands and using a full 32
> bit multiplication.
> This adds another small pass that uses UD chains to find the defs
> corresponding to the operands of a multiply, and if they all use the
> same kind of extension, modify the multiply insn to perform a widening
> multiply. It recognizes not only ZERO_EXTEND and SIGN_EXTEND, but also
> right shifts (logical and arithmetic) by half the mode size.
Is this a win for all backends, and if not, would it be possible to
condition the pass on whether or not the backend implements suitable insns to
be able to take advantage of the opportunities for optimisation that this pass
offers? (I'm just thinking about the gradual accumulation of passes and
compile-time regression here, not objecting in principle).
cheers,
DaveK