Hi!

On Mon, Mar 30, 2020 at 09:50:05AM +0100, Richard Sandiford wrote:
> Peter Bergner via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> > -  if (HARD_REGISTER_NUM_P (rd) || HARD_REGISTER_NUM_P (rs))
> > +  if (HARD_REGISTER_NUM_P (rd))
> >      return false;
> >  
> >    b = reg_copy_graph[rs];
> 
> I guess this would also work if we dropped the rd check instead.
> So how about s/||/&&/ instead, to avoid the assymetry?
> 
> I agree something like this is a better fix long-term, since we
> shouldn't be relying on make_more_copies outside combine.

Yes; on the other hand, most RTL passes should do something to not have
hard registers forwarded into non-move instructions (where they can
cause problems later).  (make_more_copies itself is a technicality
specific to how combine works, and we might be able to drop it in the
future).

> With this change, the only remaining function of -fsplit-wide-types-early
> is to act as a double lock on one pass.  IMO it'd make more sense to remove
> that double lock and make -fsplit-wide-types-early and -fsplit-wide-types
> act as independent options, a bit like -fschedule-insns{,2}.

Sure, that would simplify things a bit (at least conceptually).

With or without that change, the documentation could use some tweaking
as well, after this patch.


Segher

Reply via email to