[llvm] [TableGen][DecoderEmitter] Fix decoder reading bytes past instruction (PR #154916)
Rahul Joshi via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 22 08:38:09 PDT 2025
================
@@ -501,28 +516,47 @@ class FilterChooser {
};
public:
+ /// Constructs a top-level filter chooser.
FilterChooser(ArrayRef<InstructionEncoding> Encodings,
- ArrayRef<unsigned> EncodingIDs, unsigned BW,
+ ArrayRef<unsigned> EncodingIDs, unsigned MaxFilterWidth,
const DecoderEmitter *E)
- : Encodings(Encodings), EncodingIDs(EncodingIDs), FilterBits(BW),
- Parent(nullptr), BitWidth(BW), Emitter(E) {
+ : Encodings(Encodings), EncodingIDs(EncodingIDs), Parent(nullptr),
+ MaxFilterWidth(MaxFilterWidth), Emitter(E) {
+ // Sort encoding IDs once.
----------------
jurahul wrote:
When my other fix goes in (to set BitWidth = 8 * Size), we won't need to do this sorting for fixed length instructions it seems (since they will all correctly have the same bitwidth unlike today), so this will be needed only for variable length insts. Is that fair to day?
https://github.com/llvm/llvm-project/pull/154916
More information about the llvm-commits
mailing list