[PATCH, LRA]: Revert the revert of removal of usless move insns.

Vladimir Makarov vmakarov@redhat.com
Sat Apr 20 06:14:00 GMT 2019


On 11/21/18 2:33 PM, Uros Bizjak wrote:
> Hello!
>
> Before the recent patch to post-reload mode switching, vzeroupper
> insertion depended on the existence of the return copy instructions
> pair in functions that return a value. The first instruction in the
> pair represents a move to a function return hard register, and the
> second was a USE of the function return hard register. Sometimes a nop
> move was generated (e.g. %eax->%eax) for the first instruction of the
> return copy instructions pair and the patch [1] teached LRA  to remove
> these useless instructions on the fly.
>
> The removal caused optimize mode switching to trigger the assert,
> since the first instruction of a return pair was not found. The
> relevant part of the patch was later reverted. With the recent
> optimize mode switching patch, this is no longer necessary for
> vzeroupper insertion pass, so attached patch reverts the revert.
>
> 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
>
>      Revert the revert:
>      2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
>
>      Revert:
>      2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
>
>      * lra-spills.c (lra_final_code_change): Remove useless move insns.
>
> Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> OK for mainline?
Sure, Uros. I support the patch.  But I think it would be wise to 
postpone its committing after releasing GCC-9.  Simply it is hard to 
predict the patch effect to other targets and I would avoid any risk at 
this stage.
> [1] https://gcc.gnu.org/ml/gcc-patches/2013-10/msg02208.html
>
> Uros.



More information about the Gcc-patches mailing list