Skip to content

Commit d491d2b

Browse files
committed
[AMDGPU] Add cl option to relax lds dma waitcnt
1 parent 688d7a5 commit d491d2b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ static cl::opt<bool> ForceEmitZeroLoadFlag(
5858
cl::desc("Force all waitcnt load counters to wait until 0"),
5959
cl::init(false), cl::Hidden);
6060

61+
static cl::opt<bool>
62+
RelaxLDSDMA("amdgpu-relax-lds-dma-waitcnt",
63+
cl::desc("Relax the waitcnt for LDS DMA instructions"),
64+
cl::init(false), cl::Hidden);
65+
6166
namespace {
6267
// Class of object that encapsulates latest instruction counter score
6368
// associated with the operand. Used for determining whether
@@ -1748,7 +1753,7 @@ bool SIInsertWaitcnts::generateWaitcntInstBefore(MachineInstr &MI,
17481753
}
17491754
}
17501755
}
1751-
if (!FoundAliasingStore)
1756+
if (!FoundAliasingStore || RelaxLDSDMA)
17521757
ScoreBrackets.determineWait(LOAD_CNT, RegNo, Wait);
17531758
if (Memop->isStore()) {
17541759
ScoreBrackets.determineWait(EXP_CNT, RegNo, Wait);

0 commit comments

Comments
 (0)