Hi all,

I was wondering if anyone understands the rationale behind the current
limitations on (define_subst), ie. working only on (define_insn) and
(define_expand).

A lot of md cleanup, as well as extra patterns for combiner use, could be
enabled by supporting (define_split) / (define_insn_and_split) /
(define_peephole2) so I've had a very brief look at adding support for
these constructs, and from what I see there are only a few barriers
standing in the way.

1. attributes are used to store iterator state. This is fine for insns and
expands,, but splits and peephole2- do not have attributes. Some alternate
storage could be used, or attributes could added for splits and peephole2s.

2. splits and peephole2s will have two RTL patterns which the transform
might be intended to apply to. Adding an attribute to (define_subst) to
flag whether it applies to 'old', 'new' or both RTL patterns in the
definition seems a reasonable change to support this.

Does anyone have any insight into anything else that would stop this from
working?

Thanks!
-- 
Colin

Reply via email to