[all-commits] [llvm/llvm-project] 752798: [AMDGPU] Use direct lookup table for VOPD eligibil...
Igor Wodiany via All-commits
all-commits at lists.llvm.org
Fri May 29 02:39:16 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7527985fd76cd2a22e4d2a168b813fd29142e24d
https://github.com/llvm/llvm-project/commit/7527985fd76cd2a22e4d2a168b813fd29142e24d
Author: Igor Wodiany <igor.wodiany at amd.com>
Date: 2026-05-29 (Fri, 29 May 2026)
Changed paths:
M llvm/lib/Target/AMDGPU/SIInstrInfo.td
M llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
M llvm/lib/Target/AMDGPU/VOPDInstructions.td
M llvm/lib/Target/AMDGPU/VOPInstructions.td
Log Message:
-----------
[AMDGPU] Use direct lookup table for VOPD eligibility (#200241)
This further improves lookup by using a packed key that returns both X
and Y eligibility via a direct lookup, removing the need for a binary
search on the VOPDX and VOPDY tables.
Due to TableGen limitations the direct lookup table is generated
manually from the VOPDX and VOPDY tables. Doing it automatically is
future work.
After this patch, `getCanBeVOPD` is reduced to one O(log n) binary
search and one O(1) direct lookup. We could replace the whole function
with a direct lookup using Opc as a key, but the new table would be an
order of magnitude larger. As such, a two-step lookup is the preferred
approach unless we can show that the benefit of a single lookup
outweighs the significant increase in table size — especially since n in
the initial O(log n) lookup is only ~50.
With this patch I'm seeing a decrease from ~2.5% to ~1.75% in perf
report for `getCanBeVOPD`. The baseline has both #199072 and #200184
applied.
Assisted-By: Claude Code
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