[all-commits] [llvm/llvm-project] 5ee67e: [LLVM][TableGen] Code cleanup in FastISelEmitter.c...

Rahul Joshi via All-commits all-commits at lists.llvm.org
Wed May 14 12:51:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ee67ee6bc45979eb81b087c6a700573e2ab61db
      https://github.com/llvm/llvm-project/commit/5ee67ee6bc45979eb81b087c6a700573e2ab61db
  Author: Rahul Joshi <rjoshi at nvidia.com>
  Date:   2025-05-14 (Wed, 14 May 2025)

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

  Log Message:
  -----------
  [LLVM][TableGen] Code cleanup in FastISelEmitter.cpp (#139644)

- Use StringRef instead of std::string for `InstructionMemo::Name`.
- Use range for loops, zip_equal and structured bindings in loops.
- Use llvm::any_of instead of manual loops.
- Use ListSeparator.
- Remove {} around single-line if-else chains.
- Use ArrayRef<> instead of const vector reference for function args.
- Change `getLegalCName` to accept a `StringRef` to avoid
StringRef->std::string casting in several places.
- Use StringRef instead of std::string for `OpcodeName` (and in
associated maps).

Tested by verifying no changes in .inc files with and without this
change.



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