[llvm] r293545 - GlobalISel: tidy up def/use test. NFC.
Tim Northover via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 12:52:37 PST 2017
Author: tnorthover
Date: Mon Jan 30 14:52:37 2017
New Revision: 293545
URL: http://llvm.org/viewvc/llvm-project?rev=293545&view=rev
Log:
GlobalISel: tidy up def/use test. NFC.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp?rev=293545&r1=293544&r2=293545&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp Mon Jan 30 14:52:37 2017
@@ -142,9 +142,9 @@ bool InstructionSelect::runOnMachineFunc
unsigned VReg = VRegToType.first;
auto *RC = MRI.getRegClassOrNull(VReg);
MachineInstr *MI = nullptr;
- if (MRI.def_instr_begin(VReg) != MRI.def_instr_end())
+ if (!MRI.def_empty(VReg))
MI = &*MRI.def_instr_begin(VReg);
- else if (MRI.use_instr_begin(VReg) != MRI.use_instr_end())
+ else if (!MRI.use_empty(VReg))
MI = &*MRI.use_instr_begin(VReg);
if (MI && !RC) {
More information about the llvm-commits
mailing list