[PATCH 01/12] reduce conditional compilation for HARD_FRAME_POINTER_IS_ARG_POINTER

Bernd Schmidt bschmidt@redhat.com
Mon Nov 9 19:01:00 GMT 2015


On 11/09/2015 05:47 PM, tbsaunde+gcc@tbsaunde.org wrote:
> +++ b/gcc/dbxout.c
> @@ -3076,10 +3076,8 @@ dbxout_symbol_location (tree decl, tree type, const char *suffix, rtx home)
>   	       || (REG_P (XEXP (home, 0))
>   		   && REGNO (XEXP (home, 0)) != HARD_FRAME_POINTER_REGNUM
>   		   && REGNO (XEXP (home, 0)) != STACK_POINTER_REGNUM
> -#if !HARD_FRAME_POINTER_IS_ARG_POINTER
> -		   && REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM
> -#endif
> -		   )))
> +		   && (HARD_FRAME_POINTER_IS_ARG_POINTER
> +		       || REGNO (XEXP (home, 0)) != ARG_POINTER_REGNUM))))

This used to be

#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM

and the whole macro seems kind of pointless - why not just make the 
ARG_POINTER_REGNUM test unconditional? I think the conditional 
compilation was originally just a "performance optimization", avoiding 
unnecessary tests - which means the reason to have the tests goes away 
if we move away from the conditional compilation.


Bernd



More information about the Gcc-patches mailing list