[all-commits] [llvm/llvm-project] e9492c: [TableGen] DecoderEmitter clean-ups and modernizat...

Jason Eckhardt via All-commits all-commits at lists.llvm.org
Tue Mar 12 14:02:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e9492ccae085b5feb850ff17a96fe8211f7f6d7d
      https://github.com/llvm/llvm-project/commit/e9492ccae085b5feb850ff17a96fe8211f7f6d7d
  Author: Jason Eckhardt <jeckhardt at nvidia.com>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M llvm/utils/TableGen/DecoderEmitter.cpp

  Log Message:
  -----------
  [TableGen] DecoderEmitter clean-ups and modernization. (#84832)

The decoder emitter is showing some signs of age. This patch makes a few
kinds of clean-ups:
- Use ranged-for more widely, including using enumerate() for those
loops maintaining a loop index along with the items.
- Reduce the number of arguments to fieldFromInsn (removes an out
reference parameter: CodingStandards). The insn_t argument to insnWithID
can/should probably be removed soon too since modern C++ allows us to
return a local container without a copy.
- Use raw strings for the large emitted code segments. This enhances
both readability and modifiability.



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