[PATCH] D73338: [AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions
Valery Pykhtin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 27 06:34:05 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4332f1a4c826: [AMDGPU] Fix GCN regpressure trackers for INLINEASM instructions. (authored by vpykhtin).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73338/new/
https://reviews.llvm.org/D73338
Files:
llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
Index: llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+++ llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
@@ -327,8 +327,9 @@
// update max pressure
MaxPressure = max(AtMIPressure, MaxPressure);
- for (const auto &MO : MI.defs()) {
- if (!MO.isReg() || !Register::isVirtualRegister(MO.getReg()) || MO.isDead())
+ for (const auto &MO : MI.operands()) {
+ if (!MO.isReg() || !MO.isDef() ||
+ !Register::isVirtualRegister(MO.getReg()) || MO.isDead())
continue;
auto Reg = MO.getReg();
@@ -403,8 +404,8 @@
LastTrackedMI = &*NextMI++;
// Add new registers or mask bits.
- for (const auto &MO : LastTrackedMI->defs()) {
- if (!MO.isReg())
+ for (const auto &MO : LastTrackedMI->operands()) {
+ if (!MO.isReg() || !MO.isDef())
continue;
Register Reg = MO.getReg();
if (!Register::isVirtualRegister(Reg))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73338.240558.patch
Type: text/x-patch
Size: 970 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200127/232857b8/attachment.bin>
More information about the llvm-commits
mailing list