[PATCH] D116945: [MachineInstr] Don't include debug uses in bundle header (PR52817)

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 02:21:06 PST 2022


nikic added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineInstrBundle.cpp:147-158
+    // Debug instructions have no effects to track.
+    if (MII->isDebugInstr())
+      continue;
+
     for (unsigned i = 0, e = MII->getNumOperands(); i != e; ++i) {
       MachineOperand &MO = MII->getOperand(i);
       if (!MO.isReg())
----------------
MatzeB wrote:
> Does checking `MO.readsReg()` work as well? I looks like we may have a similar problem with `undef` operands.
Nope, that doesn't work. It looks like `MO.readsReg()` returns true for DBG_VALUE uses.


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

https://reviews.llvm.org/D116945



More information about the llvm-commits mailing list