[PATCH] D81675: SILoadStoreOptimizer: add support for GFX10 image instructions

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 12 07:31:36 PDT 2020


foad marked an inline comment as done.
foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp:108-113
+  bool SBase = 0;
+  bool SRsrc = 0;
+  bool SOffset = 0;
+  bool VAddr = 0;
+  bool Addr = 0;
+  bool SSamp = 0;
----------------
nhaehnle wrote:
> false instead of 0 for bools.
> 
> But how about keeping RegisterEnum and making this two unsigned chars, one for the RegisterEnum flags and one for the NumVAddrs?
I think using separate fields is better than bit twiddling. The storage size of AddressRegs doesn't really matter because it isn't stored anywhere, only used to return info from getRegs. In retrospect I shouldn't have bothered squashing NumVAddrs into a single byte.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81675





More information about the llvm-commits mailing list