aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineScheduler.cpp
diff options
context:
space:
mode:
authorJay Foad <jay.foad@amd.com>2023-05-24 14:57:23 +0100
committerJay Foad <jay.foad@amd.com>2023-06-01 19:17:34 +0100
commit5022fc2ad31b5e3211e2458347c89412b8c5ec1b (patch)
tree3ce4e7d2001a8552c457ae8a0ec1b58fc669f4ae /llvm/lib/CodeGen/MachineScheduler.cpp
parent2de54b919ba5fd9ccf37038cddfc36e97eb480af (diff)
downloadllvm-5022fc2ad31b5e3211e2458347c89412b8c5ec1b.zip
llvm-5022fc2ad31b5e3211e2458347c89412b8c5ec1b.tar.gz
llvm-5022fc2ad31b5e3211e2458347c89412b8c5ec1b.tar.bz2
[CodeGen] Make use of MachineInstr::all_defs and all_uses. NFCI.
Differential Revision: https://reviews.llvm.org/D151424
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineScheduler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp
index 3fa35d7c..b5b9180 100644
--- a/llvm/lib/CodeGen/MachineScheduler.cpp
+++ b/llvm/lib/CodeGen/MachineScheduler.cpp
@@ -1127,8 +1127,8 @@ void ScheduleDAGMILive::collectVRegUses(SUnit &SU) {
// Ignore re-defs.
if (TrackLaneMasks) {
bool FoundDef = false;
- for (const MachineOperand &MO2 : MI.operands()) {
- if (MO2.isReg() && MO2.isDef() && MO2.getReg() == Reg && !MO2.isDead()) {
+ for (const MachineOperand &MO2 : MI.all_defs()) {
+ if (MO2.getReg() == Reg && !MO2.isDead()) {
FoundDef = true;
break;
}