[mlir][pdl] Fix bug when ordering predicates
authorRiver Riddle <riddleriver@gmail.com>
Tue, 23 Feb 2021 03:00:54 +0000 (19:00 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Tue, 23 Feb 2021 03:02:48 +0000 (19:02 -0800)
commitddd556f10e382e64003c98fa9308ce1860cc2ad6
tree670c792ae91a282df3335b24988ecc4e2baea256
parent4125cabce1374209843393d1e9474efea58cbeaf
[mlir][pdl] Fix bug when ordering predicates

We should be ordering predicates with higher primary/secondary sums first, but we are currently ordering them last. This allows for predicates more frequently encountered to be checked first.

Differential Revision: https://reviews.llvm.org/D95715
mlir/lib/Conversion/PDLToPDLInterp/PredicateTree.cpp
mlir/test/Conversion/PDLToPDLInterp/pdl-to-pdl-interp-matcher.mlir