On Mon, Nov 09, 2015 at 08:01:28PM +0100, Bernd Schmidt wrote:
> On 11/09/2015 05:47 PM, tbsaunde+...@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

With the exception of the emit-rtl.c hunk I think I've correctly
convinced myself this macro is just an optimization.

> 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.

Well, with this patch the test should still get optimized away when
appropriate, but if you want to go to supporting multiple targets then
yeah it might as well go away.

Trev

> 
> 
> Bernd

Reply via email to