[PATCH] CodeGen: Use mop_iterator instead of MIOperands/ConstMIOperands

Matthias Braun matze at braunis.de
Thu May 21 21:16:25 PDT 2015


Hi atrick, qcolombet,

MIOperands/ConstMIOperands are classes iterating over the MachineOperand
of a MachineInstr, however MachineInstr::mop_iterator does the same
thing.

I assume these two iterators exist to have a uniform interface to
iterate over the operands of a machine instruction bundle and a single
machine instruction. However in practice I find it more confusing to have 2
different iterator classes, so this patch transforms (nearly all) MIOperands
users to mop_iterators.

The only exception being MIOperands::anlayzePhysReg() and
MIOperands::analyzeVirtReg() which have no equivalent, I leave that
as an exercise for the next patch.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9932

Files:
  lib/CodeGen/EarlyIfConversion.cpp
  lib/CodeGen/LiveIntervalAnalysis.cpp
  lib/CodeGen/MachineInstr.cpp
  lib/CodeGen/MachineLICM.cpp
  lib/CodeGen/MachineTraceMetrics.cpp
  lib/CodeGen/ProcessImplicitDefs.cpp
  lib/CodeGen/RegisterCoalescer.cpp
  lib/CodeGen/ScheduleDAGInstrs.cpp
  lib/Target/ARM/ARMLoadStoreOptimizer.cpp
  lib/Target/ARM/Thumb2ITBlockPass.cpp
  lib/Target/Hexagon/HexagonFrameLowering.cpp
  lib/Target/X86/X86FastISel.cpp

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9932.26305.patch
Type: text/x-patch
Size: 18459 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150522/0c4ba9b4/attachment.bin>


More information about the llvm-commits mailing list