[all-commits] [llvm/llvm-project] f5a332: AMDGPU: Move some code out of macro for defining r...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Aug 28 06:08:47 PDT 2025


  Branch: refs/heads/users/arsenm/amdgpu/disassembler-reduce-code-in-macro
  Home:   https://github.com/llvm/llvm-project
  Commit: f5a332168efee95b3ec97ae99674e2455f714402
      https://github.com/llvm/llvm-project/commit/f5a332168efee95b3ec97ae99674e2455f714402
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-08-28 (Thu, 28 Aug 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp

  Log Message:
  -----------
  AMDGPU: Move some code out of macro for defining regclass decoder

Use a template function for the implementation, and use the macro
to define a constant function pointer with the expected name. Not
sure if there's a cleaner way to do this. This worked out to less
code using variadic templates to forward the arguments, but it added
a noticable ~10 seconds to compilation time on this file.

This will help avoid another copy-paste version of this function
in a future change.


  Commit: 5ccb1a67884484415ef583f41e7a8d8ea88c3b13
      https://github.com/llvm/llvm-project/commit/5ccb1a67884484415ef583f41e7a8d8ea88c3b13
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-08-28 (Thu, 28 Aug 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp

  Log Message:
  -----------
  Use lambda to forward arguments

This seems to cost 4-5 seconds in build time in the file


  Commit: e6cd6efb9919c8f51b2937ec5d2fd812567857ec
      https://github.com/llvm/llvm-project/commit/e6cd6efb9919c8f51b2937ec5d2fd812567857ec
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-08-28 (Thu, 28 Aug 2025)

  Changed paths:
    M llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.cpp

  Log Message:
  -----------
  Revert "Use lambda to forward arguments"

This reverts commit 79d03ff80ed3ac9d8f072955c2bae5d7567ff56a.


Compare: https://github.com/llvm/llvm-project/compare/0f88c29bcf86...e6cd6efb9919

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