[PATCH] D120431: [AMDGPU] Merge flat with global in the SILoadStoreOptimizer

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 24 06:30:47 PST 2022


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:82
   TBUFFER_STORE,
   GLOBAL_LOAD,
   GLOBAL_LOAD_SADDR,
----------------
You should at least comment that GLOBAL_LOAD/GLOBAL_STORE are never used as the InstClass of any CombineInfo, they are only ever returned by getCommonInstClass. Maybe move them to the end as they are kind of meta-classes.


================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:532
 
+InstClassEnum
+SILoadStoreOptimizer::getCommonInstClass(const CombineInfo &CI,
----------------
Needs a comment saying what this does. It is not obvious from the name.


================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:1584
        .addImm(CI.CPol)
-       .addMemOperand(combineKnownAdjacentMMOs(*MBB->getParent(), MMOa, MMOb));
+       .addMemOperand(combineKnownAdjacentMMOs(CI, Paired));
 
----------------
This looks like part of D120370.


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

https://reviews.llvm.org/D120431



More information about the llvm-commits mailing list