Avoid direct use of GO_IF_LEGITIMATE_ADDRESS

Zack Weinberg zack@codesourcery.com
Mon Aug 9 20:16:00 GMT 2004


Richard Earnshaw <rearnsha@gcc.gnu.org> writes:

> Why not just 
>
>         return 0;
>  
>        /* Use the mem's mode, since it will be reloaded thus.  */
> -      mode = GET_MODE (op);
> -      GO_IF_LEGITIMATE_ADDRESS (mode, y, win);
> +      return memory_address_p (GET_MODE (op), y);
>      }
>  
>    return 0;
> -
> - win:
> -  return 1;
>  }
>
> since memory_address_p returns 0 or 1 anyway and this makes it a
> tail-call.

I didn't think of that, is all.  Wanna change it?  I've got a bunch of
other things going right now.

zw



More information about the Gcc-patches mailing list