diff options
author | Sergei Barannikov <barannikov88@gmail.com> | 2024-12-13 19:55:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-13 19:55:11 +0300 |
commit | c9070cce09e1aef1c4bf1cb8c0000294b533dcd7 (patch) | |
tree | 94fcecf50c9ddb2117e83b93668984280d6ba664 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | |
parent | fb02c33605bd988e9c6bb3a18cd7f0c3b1f20d5c (diff) | |
download | llvm-c9070cce09e1aef1c4bf1cb8c0000294b533dcd7.zip llvm-c9070cce09e1aef1c4bf1cb8c0000294b533dcd7.tar.gz llvm-c9070cce09e1aef1c4bf1cb8c0000294b533dcd7.tar.bz2 |
[TableGen] Allow empty terminator in SequenceToOffsetTable (#119751)
Some clients do not want to emit a terminator after each sub-sequence
(they have other means of determining the length of sub-sequences).
This moves `Term` argument from `emit` method to the constructor and
makes it optional. It couldn't be made optional while still on the
`emit` method because if the terminator wasn't specified, it has to be
taken into account in `layout` method as well.
The fact that `layout` method was called is now recorded in a dedicated
member variable, `IsLaidOut`. `Entries != 0` can no longer be used to
reliably check if `layout` method was called because it may be zero for
a different reason: the terminator wasn't specified and all added
sequences (if any) were empty.
This reduces the size of `*LaneMaskLists` and `*SubRegIdxLists` a bit
and resolves the removed TODO.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions