On Fri, 17 Oct 2008, Joern Rennecke wrote:

> On Fri, Oct 17, 2008 at 10:46:41AM -0700, Ian Lance Taylor wrote:
> >
> > I think you could achieve the same result by writing multiple
> > define_insn patterns and using the instruction predicate.
>
> Yes, I could.  But that would quadruple my machine description,
> which is already 169 KB, and it would make it harder to maintain.

You could use iterators... except you'd probably want to iterate
over text, not RTX codes or machine modes.  Maybe a good reason
to introduce generalized (or maybe just text) iterators!

(define_iterator i [foo bar])
(define_text_attr i_constraint [(foo "constraint1") (bar "constraint2")
(define_text_attr i_condition [(foo "optimize_size") (bar "!optimize_size")])
or something.

brgds, H-P
PS. if extended to be a general parametrized iterator, it could
be used to reduce pattern explosion for cc0 eliminations.

Reply via email to