[llvm] [DecoderEmitter] Support for DecodeOrder and `resolve-conflicts-try-all` (PR #157948)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 13 06:31:55 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()) {
----------------
jurahul wrote:
You're right. The OpScopeNoFail that I added was meant to address that, but maybe the current scope needs to implement that behavior. Essentially, of the ops that can fail and return from the decode function, ops like FilterValue and CheckField are scope-aware, that is they are terminal (i.e., return from `decodeInstruction`) only if there is no scope, else they return to the outer scope. OPC_Decode and TryDecode (when DecodeComplete is true) and not like that, they are always terminal and return from decodeInstruction. In the case above, if they had the ScopeNoFail similar to FilterValue, when decoding the "FilteredIDs" InstA Decode/TryDecode will fail, but because of the scope, it will return and continue to the variable part, where it will succeed.
https://github.com/llvm/llvm-project/pull/157948
More information about the llvm-commits
mailing list