On Wed, 2020-02-19 at 12:59 +0000, Richard Sandiford wrote:
> This PR is about a case in which the clobbers at the start of
> an EH receiver can lead to registers becoming unnecessarily
> live in predecessor blocks.  My first attempt at fixing this
> made sure that we update the bb liveness info based on the
> real live set:
> 
>   http://gcc.gnu.org/g:e648e57efca6ce6d751ef8c2038608817b514fb4
> 
> But it turns out that the clobbered registers were also added to
> the "gen" set of LRA's private liveness problem, where "gen" in
> this context means "generates a requirement for a live value".
> So the clobbered registers could still end up live via that
> mechanism instead.
> 
> This patch therefore reverts the patch above and takes the other
> approach floated in the original patch description: model the full
> clobber by making the registers live and then dead again.
> 
> There's no specific need to revert the original patch, since the
> code should no longer be sensitive to the order of the bb liveness
> update and the modelling of the clobber.  But given that there's
> no specific need to keep the original patch either, it seemed better
> to restore the code to the more well-tested order.
> 
> Tested on aarch64-linux-gnu and x86_64-linux-gnu.  OK to install?
> 
> Richard
> 
> 
> 2020-02-19  Richard Sandiford  <richard.sandif...@arm.com>
> 
> gcc/
>       PR rtl-optimization/PR92989
>       * lra-lives.c (process_bb_lives): Restore the original order
>       of the bb liveness update.  Call make_hard_regno_dead for each
>       register clobbered at the start of an EH receiver.
THanks.  Installed.
jeff
> 

Reply via email to