This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 04/25] SPECIAL_REGNO_P
On 09/05/2018 04:48 AM, ams@codesourcery.com wrote:
> @@ -1198,6 +1198,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
> #define NO_FUNCTION_CSE false
> #endif
>
> +#ifndef SPECIAL_REGNO_P
> +#define SPECIAL_REGNO_P(REGNO) false
> +#endif
> +
> #ifndef HARD_REGNO_RENAME_OK
> #define HARD_REGNO_RENAME_OK(FROM, TO) true
> #endif
...
> @@ -320,6 +320,7 @@ check_new_reg_p (int reg ATTRIBUTE_UNUSED, int new_reg,
> if (TEST_HARD_REG_BIT (this_unavailable, new_reg + i)
> || fixed_regs[new_reg + i]
> || global_regs[new_reg + i]
> + || SPECIAL_REGNO_P (new_reg + i)
> /* Can't use regs which aren't saved by the prologue. */
> || (! df_regs_ever_live_p (new_reg + i)
> && ! call_used_regs[new_reg + i])
How is this different from HARD_REGNO_RENAME_OK via the TO argument?
Seems like the hook you're looking for already exists...
r~