[PATCH] D90505: [AMDGPU] Improve FLAT scratch detection
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 2 07:40:01 PST 2020
foad added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.h:580
+ return isSegmentSpecificFLAT(MI) &&
+ AMDGPU::getFlatScratchInst(MI.getOpcode()) >= 0;
}
----------------
rampitec wrote:
> 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.
I see. I thought the table lookup was a direct O(1) lookup. I didn't realise it is a binary chop.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90505/new/
https://reviews.llvm.org/D90505
More information about the llvm-commits
mailing list