[PATCH] D124550: [AMDGPU] Handle LDS DMA and LDS_DIRECT hazards
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 3 10:55:14 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp:366-368
if (ST.hasReadM0MovRelInterpHazard() && (TII.isVINTRP(*MI) ||
isSMovRel(MI->getOpcode())))
return std::max(WaitStates, checkReadM0Hazards(MI));
----------------
rampitec wrote:
> foad wrote:
> > The coding style is strange here because it looks like it could call checkReadM0Hazards four times. But I guess in practice at most one of the conditionals will be true?
> It tests for different types of instructions, so the actual function will be called once at most. Moreover, these are not common instructions. In fact scanning for operands to see if it uses LDS_DIRECT is more expensive.
Don't see why you merged in these cases that early returned before
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124550/new/
https://reviews.llvm.org/D124550
More information about the llvm-commits
mailing list