[PATCH] D86568: [AMDGPU] Switch to named simm16 in vscnt insertion
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 13:05:41 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG817c831f023a: [AMDGPU] Switch to named simm16 in vscnt insertion (authored by rampitec).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86568/new/
https://reviews.llvm.org/D86568
Files:
llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
Index: llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
+++ llvm/lib/Target/AMDGPU/SIInsertWaitcnts.cpp
@@ -1090,8 +1090,8 @@
} else {
assert(II->getOpcode() == AMDGPU::S_WAITCNT_VSCNT);
assert(II->getOperand(0).getReg() == AMDGPU::SGPR_NULL);
- ScoreBrackets.applyWaitcnt(
- AMDGPU::Waitcnt(~0u, ~0u, ~0u, II->getOperand(1).getImm()));
+ auto W = TII->getNamedOperand(*II, AMDGPU::OpName::simm16)->getImm();
+ ScoreBrackets.applyWaitcnt(AMDGPU::Waitcnt(~0u, ~0u, ~0u, W));
}
}
}
@@ -1139,12 +1139,13 @@
assert(II->getOpcode() == AMDGPU::S_WAITCNT_VSCNT);
assert(II->getOperand(0).getReg() == AMDGPU::SGPR_NULL);
- unsigned ICnt = II->getOperand(1).getImm();
+ unsigned ICnt = TII->getNamedOperand(*II, AMDGPU::OpName::simm16)
+ ->getImm();
OldWait.VsCnt = std::min(OldWait.VsCnt, ICnt);
if (!TrackedWaitcntSet.count(&*II))
Wait.VsCnt = std::min(Wait.VsCnt, ICnt);
if (Wait.VsCnt != ICnt) {
- II->getOperand(1).setImm(Wait.VsCnt);
+ TII->getNamedOperand(*II, AMDGPU::OpName::simm16)->setImm(Wait.VsCnt);
Modified = true;
}
Wait.VsCnt = ~0u;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86568.287758.patch
Type: text/x-patch
Size: 1386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200825/ac2a400f/attachment-0001.bin>
More information about the llvm-commits
mailing list