[5/9] Create sensible dummy registers
Jeff Law
law@redhat.com
Fri May 22 20:05:00 GMT 2015
On 05/22/2015 09:39 AM, Richard Sandiford wrote:
> Eric Botcazou <ebotcazou@adacore.com> writes:
>>> Some pieces of code create a temporary REG or MEM and only fill it
>>> in later when they're testing the cost of a particular rtx. This patch
>>> makes sure that even the dummy REG or MEM is valid, rather than force
>>> the gen_* code to handle garbage values.
>>>
>>>
>>> gcc/
>>> * caller-save.c (init_caller_save): Use word_mode and
>>> FIRST_PSEUDO_REGISTER when creating temporary rtxes.
>>> * expr.c (init_expr_target): Likewise.
>>> * ira.c (setup_prohibited_mode_move_regs): Likewise.
>>> * postreload.c (reload_cse_regs_1): Likewise.
>>
>> Isn't LAST_VIRTUAL_REGISTER + 1 the canonical regno to be used in this case?
>
> Ah, yeah. Here's patch to fix all instances of that (I hope).
>
> Bootstrapped & regression-tested on x86_64-linux-gnu. OK to install?
>
> Thanks,
> Richard
>
>
> gcc/
> * caller-save.c (init_caller_save): Base temporary register numbers
> on LAST_VIRTUAL_REGISTER + 1 rather than FIRST_PSEUDO_REGISTER.
> * cfgloopanal.c (init_set_costs): Likewise.
> * dojump.c (prefer_and_bit_test): Likewise.
> * expr.c (init_expr_target): Likewise.
> * ira.c (setup_prohibited_mode_move_regs): Likewise.
> * lower-subreg.c (init_lower_subreg): Likewise.
> * postreload.c (reload_cse_regs_1): Likewise.
OK.
jeff
More information about the Gcc-patches
mailing list