https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91635

--- Comment #22 from Jim Wilson <wilson at gcc dot gnu.org> ---
> First of all, I think you need to use :DI instead of :GPR for the last
> define_split, as it shouldn't be iterated with.

Yes, sloppy copy paste.  I will fix before committing.

> Second, doesn't this mean that the splitters will be matched then only
> during combine and never afterwards?

The define_splits were specifically written to match patterns created by
combine that aren't valid instructions.  So I think it is OK if they can only
be matched during combine.  My empirical results are good looking at libc and
libstdc++ code size, I haven't seen any cases where I get worse code size by
modifying them to use clobbers.

> The can_create_pseudo_p () -> gen_reg_rtx (mode) way of adding intermediate
> temporaries is used heavily in many other backends, just look at say i386,
> rs6000 or aarch64 backends for examples (I've looked only at those 3 and
> found many spots in each), so if missing REG_DEAD notes affect code quality,
> perhaps it would be more useful to try to change the combiner to add those
> notes (say before splitting remember highest pseudo number, after the
> splitter see if we've added some new pseudos and by scanning the resulting
> sequence see if we shouldn't add REG_DEAD notes for those somewhere, because
> they shouldn't be used anywhere outside of the sequence.

Yes, long term, I think it would be a good idea to improve combine to add
REG_DEAD notes for temporary regs created by splitters.  I don't plan to work
on that as I have too much other stuff to do.  I'd be willing to create a bug
report if you want me to.

Reply via email to