[PATCH] D104576: RegisterCoalescer: Fix iterating through use operands.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 18 15:39:37 PDT 2021


arsenm added inline comments.


================
Comment at: llvm/lib/CodeGen/RegisterCoalescer.cpp:1560
   if (MRI->use_nodbg_empty(SrcReg)) {
-    for (MachineOperand &UseMO : MRI->use_operands(SrcReg)) {
-      MachineInstr *UseMI = UseMO.getParent();
----------------
Can you just use the explicit iterators and preincrement instead of saving all the operands?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104576/new/

https://reviews.llvm.org/D104576



More information about the llvm-commits mailing list