This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Run the combine part of combine_and_move_insns even if -fsched-pressure
On Wed, Aug 07, 2019 at 05:26:45PM -0500, Segher Boessenkool wrote:
> On Wed, Aug 07, 2019 at 11:21:48PM +0100, Richard Sandiford wrote:
> > Segher Boessenkool <segher@kernel.crashing.org> writes:
> > > On Wed, Aug 07, 2019 at 07:16:03PM +0100, 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.
> > >
> > > During which pass are the newly combined instructions created? If not
> > > late, why does combine refuse to do this combination?
> >
> > During if_after_combine.
>
> So immediately after combine.
>
> Why did combine refuse to do this itself? What am I missing?
Oh, duh, these are *new* instructions created by that ce2 pass. Duh :-)
Segher