[PATCH] D116945: [MachineInstr] Don't include debug uses in bundle header (PR52817)
Matthias Braun via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 13 10:15:42 PST 2022
MatzeB added a comment.
- Loosing the `internal` flag for uses that don't really read the register seems fine to me.
- Added a suggestion to try `MachineOperand::readsReg()` instead of checking for debug instructions.
================
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())
----------------
Does checking `MO.readsReg()` work as well? I looks like we may have a similar problem with `undef` operands.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116945/new/
https://reviews.llvm.org/D116945
More information about the llvm-commits
mailing list