[mlir][IRNumbering] Fix the dialect comparator to be strict
authorRiver Riddle <riddleriver@gmail.com>
Wed, 8 Feb 2023 01:37:00 +0000 (17:37 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Wed, 8 Feb 2023 02:06:34 +0000 (18:06 -0800)
commit1fbccfd69324f08f067ca5534abc67d32cad75ed
tree21ec29db465973fbf4509575ac63634a55936a12
parente80f461d99ed1338f39ad4377bf7a607a6974d33
[mlir][IRNumbering] Fix the dialect comparator to be strict

Check if rhs is the dialect to be ordered first, ensuring that
we don't inadvertantly order something before it by
falling back to pure number comparison.

This only shows up depending on the implementation of
stable_sort. This was hit in a build of MSVC that was
checking for strict ordering.
mlir/lib/Bytecode/Writer/IRNumbering.cpp