[PATCH] D122804: [AMDGPU] Only count global-to-global as indirect accesses

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 5 00:09:22 PDT 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp:156
       auto M = LD->getPointerOperand();
-      if (isGlobalAddr(M) || isLocalAddr(M) || isConstantAddr(M)) {
         LLVM_DEBUG(dbgs() << "    is IA\n");
----------------
uabelho wrote:
> I think this was the last use of the isConstantAddr method. gcc now warns with
> ```
> 23:46:06 ../lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp:339:6: warning: 'bool {anonymous}::AMDGPUPerfHint::isConstantAddr(const llvm::Value*) const' defined but not used [-Wunused-function]
> 23:46:06   339 | bool AMDGPUPerfHint::isConstantAddr(const Value *V) const {
> 23:46:06       |      ^~~~~~~~~~~~~~
> ```
> Should the unused isConstantAddr method be removed?
Sorry about that, but I am hoping to land D83676 soon (it was approved once, just waiting for confirmation that it's still OK) which will start using isConstantAddr again.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122804/new/

https://reviews.llvm.org/D122804



More information about the llvm-commits mailing list