This emits (rule-level) checks for pattern predicates. That mostly includes
subtarget feature checks. This lets us emit a selector for basic FP binops.
Using all predicates as-is in the selector emitter is not going to be
trivial in general: predicates can be arbitrary code (running in
a <Target>DAGToDAGISel member), so, over time, we've grown some pretty
interesting uses.
In the long run, we'll want to either:
- add first-class support for the different families of predicates
- add some mappings from DAGToDAGISel code to the GISel equivalent
Or a combination of both.
I originally tried to express each Predicate as a RuleMatcher
predicate child, but, without the extra checking and grouping of
predicate families, that just looked like noisy boilerplate.
In the meantime, use the aggregate raw predicate check code string.
I'd prefer it if we did these predicates the same way as for Instructions and Operands (i.e. with PredicateListMatcher<RulePredicateMatcher>). This is because I'm trying to push the SelectionDAG dependency out of the *Matcher classes so we can eventually import pure-GlobalISel rules in addition to the imported SelectionDAG rules. I also expect we'll eventually have GlobalISel-specific predicates that control when rules are applied (e.g. ISel, Pseudo-expansion, etc.)
Reaching that point isn't a near term goal though so I don't have any strong objections to importing the whole predicate expression for now and making it more precise later