[llvm] [DecoderEmitter] Support for DecodeOrder and `resolve-conflicts-try-all` (PR #157948)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 17 10:10:46 PDT 2025


jurahul wrote:

Here's an example of the conflict resolution in the 3rd call:

```
3rd call, bits 3,4
    ................
    0100............
    01000...........
    01000100........
    01000100________  tADDhirr
    01000100_1101___  tADDrSP
    010001001____101  tADDspr
```

It seems targeted to do 2 things really: Remove one of the 2 instructions with the known bit pattern into a separate filter (say in this case tADDrSP). Then we will create a filter with a single FilteredID = tADDrSP and create a sub-chooser for the remaining two, which will then lead to another choose with a single FilteredID = tADDspr and then tADDhirr in the variable part.

Now if I just disable case 3 and enable my heuristic, we will split out `tADDhirr` into its own entry and try to create a filter using `tADDrSP` and `tADDspr` and these 2 by themselves still conflict. So, we could subsume part of case 3 here and change the condition to size() == 2, but not sure if that's worth it (in terms of entangling the two heuristics).

https://github.com/llvm/llvm-project/pull/157948


More information about the llvm-commits mailing list