[PATCH] D29478: [GlobalISel] Generate selector with predicates; use it for FP binops.

Ahmed Bougacha via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 2 16:56:27 PST 2017

ab created this revision.
Herald added subscribers: rovka, dberris.

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.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29478.86919.patch
Type: text/x-patch
Size: 4134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170203/3601d1b3/attachment.bin>

More information about the llvm-commits mailing list