[AMDGPU] Only count global-to-global as indirect accesses
authorJay Foad <jay.foad@amd.com>
Thu, 31 Mar 2022 12:39:02 +0000 (13:39 +0100)
committerJay Foad <jay.foad@amd.com>
Fri, 1 Apr 2022 12:48:13 +0000 (13:48 +0100)
commitc246b7bd4a5191d48f68ce12b50e03bfadd2a0b5
treed4b790b4f89edc2d875e3394477533b916b126b0
parenta08c90a4023f8cf72aa8632b0e8d4e77c398ad4b
[AMDGPU] Only count global-to-global as indirect accesses

Previously any load (global, local or constant) feeding into a
global load or store would be counted as an indirect access. This
patch only counts global loads feeding into a global load or store.
The rationale is that the latency for global loads is generally
much larger than the other kinds.

As a side effect this makes it easier to write small kernels test
cases that are not counted as having indirect accesses, despite
the fact that arguments to the kernel are accessed with an SMEM
load.

Differential Revision: https://reviews.llvm.org/D122804
llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
llvm/test/CodeGen/AMDGPU/perfhint.ll
llvm/test/CodeGen/AMDGPU/schedule-regpressure-limit2.ll