This is the mail archive of the gcc-patches@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: [PATCH] Bugfix: Additional parameter for canonicalize comparison


On 12/10/2012 01:50 AM, Andreas Krebbel wrote:
> Ok. Here is an updated version trying to address the comments above.
> 
> 2012-12-10  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
> 
> 	* target.def: Define canonicalize_comparison hook.
> 	* targhooks.h (default_canonicalize_comparison): New prototype.
> 	* targhooks.c (default_canonicalize_comparison): New function.
> 	* doc/tm.texi: Add documentation for the new target hook.
> 	* doc/tm.texi.in: Likewise.
> 	* combine.c (try_combine): Adjust to use the target hook.
> 	* config/alpha/alpha.h (CANONICALIZE_COMPARISON): Remove macro
> 	definition.
> 	* config/alpha/alpha.c (alpha_canonicalize_comparison): New
> 	function.
> 	(TARGET_CANONICALIZE_COMPARISON): New macro definition.
> 	* config/arm/arm-protos.h (arm_canonicalize_comparison): Remove
> 	prototype.
> 	* config/arm/arm.c (arm_canonicalize_comparison): Add new
> 	parameter.
> 	(TARGET_CANONICALIZE_COMPARISON): New macro definition.
> 	* config/arm/arm.h (CANONICALIZE_COMPARISON): Remove macro
> 	definition.
> 	* config/s390/s390-protos.h (s390_canonicalize_comparison): Remove
> 	prototype.
> 	* config/s390/s390.c (s390_canonicalize_comparison): Add new
> 	parameter.
> 	(TARGET_CANONICALIZE_COMPARISON): New macro definition.
> 	* config/s390/s390.h (CANONICALIZE_COMPARISON): Remove macro
> 	definition.
> 	* config/sh/sh-protos.h (sh_canonicalize_comparison): Remove
> 	prototype.
> 	* config/sh/sh.c (sh_canonicalize_comparison): Add new prototype.  New
> 	function overloading the old one.
> 	(TARGET_CANONICALIZE_COMPARISON): New macro definition.
> 	* config/sh/sh.h (CANONICALIZE_COMPARISON): Remove macro
> 	definition.
> 	* config/spu/spu.c (spu_canonicalize_comparison): New function.
> 	(TARGET_CANONICALIZE_COMPARISON): New macro definition.
> 	* config/spu/spu.h (CANONICALIZE_COMPARISON): Remove macro
> 	definition.

Looks ok.  Although I thought Oleg was suggesting to not add a wrapper in sh,
but to adjust the users...

> + /* Convenience wrapper for the canonicalize_comparison target hook.
> +    Targets hooks cannot use enum rtx_code.  */

Honestly, for 4.9 we should fix that.  Unlike machine_mode which really is
target-specific, rtx_code is not.  It's just not defined in the right place.


r~


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