[PATCH] D43270: [GISel][Tablegen]: Make GlobalISelEmitter rule prioritization similar to that of selectionDAG

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 16 13:42:13 PST 2018

dsanders accepted this revision.
dsanders added a comment.

I can't say I'm keen on this since it's a warts-and-all port of the SelectionDAG implementation to GlobalISel but I do at least accept the argument that this is a compatibility layer. So long as as we keep it to the compatibility layer, I'm ok with it.

We still don't have a good solution for mixing GlobalISel rules and SelectionDAG rules if they're using different priority mechanisms but it seems reasonable to say that the requirement is that SelectionDAG rules should maintain the SelectionDAG priority order between themselves and GlobalISel rules may interleave with SelectionDAG rules in whatever way makes the most sense. One trivial answer is GlobalISel rules always have priority but it's probably better to merge the SelectionDAG rule list into the GlobalISel one using GlobalISel's priority ordering to find the appropriate insertion points. It's worth mentioning that we don't need to preserve SelectionDAG's order for mutually exclusive rules. It would therefore be good to expand on the mutually exclusive grouping mechanism and sort the resulting mini-lists rather than sorting the entire rule list first.



More information about the llvm-commits mailing list