This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Run the combine part of combine_and_move_insns even if -fsched-pressure


On 8/7/19 12:16 PM, Richard Sandiford wrote:
> The main IRA routine includes the code:
> 
>   /* Don't move insns if live range shrinkage or register
>      pressure-sensitive scheduling were done because it will not
>      improve allocation but likely worsen insn scheduling.  */
>   if (optimize
>       && !flag_live_range_shrinkage
>       && !(flag_sched_pressure && flag_schedule_insns))
>     combine_and_move_insns ();
> 
> The comment about not moving insns for pressure-sensitive scheduling
> makes sense, but I think the combine part of combine_and_move_insns is
> still useful, since it's folding a set of an equivalent value into its
> single user and so eliminates the need for one register altogether.
> 
> (That also means that it's likely to undo live range shrinkage in
> some cases, so I think the blanket skip still makes sense there.)
> 
> Tested on aarch64-linux-gnu, aarch64_be-elf and x86_64-linux-gnu.
> OK to install?
> 
> Richard
> 
> 
> 2019-08-07  Richard Sandiford  <richard.sandiford@arm.com>
> 
> gcc/
> 	* ira.c (combine_and_move_insns): Don't move insns if
> 	pressure-sensitive scheduling is enabled.
> 	(ira): Remove check for pressure-sensitive scheduling here.
> 
> gcc/testsuite/
> 	* gcc.target/aarch64/csinc-3.c: New test.
> 	* gcc.target/aarch64/csinv-2.c: Likewise.
OK
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]