[PATCH] D90505: [AMDGPU] Improve FLAT scratch detection

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 2 07:31:29 PST 2020


rampitec added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.h:580
+    return isSegmentSpecificFLAT(MI) &&
+           AMDGPU::getFlatScratchInst(MI.getOpcode()) >= 0;
   }
----------------
foad wrote:
> If getFlatScratchInst is just a table lookup, is there any need to do the isSegmentSpecificFLAT test first?
I have reetored it to have O(1) in most cases, table lookup will only run if it is already known segmented flat. It is purely optimization.


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

https://reviews.llvm.org/D90505



More information about the llvm-commits mailing list