[all-commits] [llvm/llvm-project] c9070c: [TableGen] Allow empty terminator in SequenceToOff...

Sergei Barannikov via All-commits all-commits at lists.llvm.org
Fri Dec 13 08:55:34 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c9070cce09e1aef1c4bf1cb8c0000294b533dcd7
      https://github.com/llvm/llvm-project/commit/c9070cce09e1aef1c4bf1cb8c0000294b533dcd7
  Author: Sergei Barannikov <barannikov88 at gmail.com>
  Date:   2024-12-13 (Fri, 13 Dec 2024)

  Changed paths:
    M llvm/test/TableGen/MixedCasedMnemonic.td
    M llvm/utils/TableGen/Basic/SequenceToOffsetTable.h
    M llvm/utils/TableGen/DFAEmitter.cpp
    M llvm/utils/TableGen/RegisterInfoEmitter.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list