[llvm] [DecoderEmitter] Support for DecodeOrder and `resolve-conflicts-try-all` (PR #157948)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 16 07:51:42 PDT 2025
================
@@ -1598,6 +1726,19 @@ void FilterChooser::doFilter() {
return;
}
+ // If we were unable to find a useful filter and there are multiple decode
+ // orders involved, split the candidates by decode order and create per decode
+ // order choosers.
+ if (hasMultipleDecodeOrders()) {
----------------
s-barannikov wrote:
> Now just doing that does not resolve the conflict, in that, I still get the decoding conflict.
Right, because hasCompleteDecoder = false doesn't change the encoding, which is currently the only factor that guides conflict resolution process.
Sometimes this can be worked around. If you know that one of your register classes always has 0 or 1 in the bitpattern at a fixed position, you can set in in the operand encoding, and together with hasCompleteDecoder = false on that register class, this can help achieve the goal.
> To address that, it seems we need to handle the case where in a filter all remaining IDs are variable IDs and there are no filtered IDs.
This case is currently impossible, `usefulness()` returns 0 in this case.
https://github.com/llvm/llvm-project/pull/157948
More information about the llvm-commits
mailing list