[PATCH] D43850: [CodeGen] Avoid handling DBG_VALUE instructions for stepBackwards

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 8 02:54:31 PST 2018


bjope added inline comments.


================
Comment at: lib/CodeGen/LivePhysRegs.cpp:60
 void LivePhysRegs::addUses(const MachineInstr &MI) {
   for (ConstMIBundleOperands O(MI); O.isValid(); ++O) {
     if (!O->isReg() || !O->readsReg())
----------------
We should probably skip debug value MIs here as well.
Or is it perhaps more correct to avoid operands with the isDebug() property set?

The current solution of skipping MI.isDebugValue() is skipping instructions.
So we assume that there are no MachineOperands with isDebug() in other instructions. I guess that is the case today, but is it more future proof to not specialize on MachineInstruction kind in these methods, and instead make sure that addUses/removeDefs/stepForward etc are skipping the operands with isDebug property set?



https://reviews.llvm.org/D43850





More information about the llvm-commits mailing list