[all-commits] [llvm/llvm-project] d7b8b6: [LLVM][TableGen][DecoderEmitter] Add wrapper struc...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Tue Jul 1 07:36:39 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d7b8b65e239f3daa08c767f899cbfd7ca2871a0d
      https://github.com/llvm/llvm-project/commit/d7b8b65e239f3daa08c767f899cbfd7ca2871a0d
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2025-07-01 (Tue, 01 Jul 2025)

  Changed paths:
    M llvm/test/TableGen/FixedLenDecoderEmitter/conflict.td
    M llvm/utils/TableGen/DecoderEmitter.cpp

  Log Message:
  -----------
  [LLVM][TableGen][DecoderEmitter] Add wrapper struct for `bit_value_t` (#146248)

Add a convenience wrapper struct for the `bit_value_t` enum type to host
various constructors, query, and printing support. Also refactor related
code in several places. In `getBitsField`, use `llvm::append_range` and
`SmallVector::append()` and eliminate manual loops. Eliminate
`emitNameWithID` and instead use the `operator <<` that does the same
thing as this function. Have `BitValue::getValue()` (replacement for
`Value`) return std::optional<> instead of -1 for unset bits. Terminate
with a fatal error when a decoding conflict is encountered.



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