[PATCH] Complex move by parts (PR rtl-optimization/20306)

Roger Sayle roger@eyesopen.com
Thu Mar 10 18:32:00 GMT 2005


On Thu, 10 Mar 2005, David Edelsohn wrote:
>
> 	PR rtl-optimization/20306
> 	* target-def.h (TARGET_COMPLEX_MOVE_BY_PARTS): Define.
> 	* target.h (struct gcc_target): Add complex_move_by_parts.
> 	* expr.c (emit_move_complex): Avoid blockmove and integer move if
> 	both operands prefer complex_move_by_parts.
>
> 	* config/rs6000/rs6000.c (rs6000_complex_move_by_parts): Define.

This is OK for all active branches (unless RTH has any objections?)
with the two very minor tweaks below.

Firstly, new target hooks need to be documented in tm.texi.  In this
case, it's probably sufficient to copy the descriptive comments from
the code.


> !   if (!targetm.complex_move_by_parts (GET_MODE (x))
> !       || !targetm.complex_move_by_parts (GET_MODE (y)))

The other tweak is that by this point in the code both X and Y should
have the same machine mode MODE, so this is more concisely written as:

   if (!targetm.complex_move_by_parts (mode))
     ...


Many thanks for investigating/fixing this.

Roger
--



More information about the Gcc-patches mailing list