[PATCH] D123394: [CodeGen] Late cleanup of redundant address/immediate definitions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 10:06:20 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp:111
+
+  // Visit all MBBs in an order that maximises the reuse from predecessors.
+  // Put the ones that are not ready in Pending and handle them in a second
----------------
Can we use RPOT(reverse post order traversal)? That will guarantee this property except for loops.


================
Comment at: llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp:164
+  Register Reg = MI->getOperand(0).getReg();
+  BitVector VisitedPreds(MI->getParent()->getParent()->getNumBlockIDs());
+  clearKillsForDef(Reg, MI->getParent(), MI->getIterator(), VisitedPreds, TRI);
----------------
I think you can use `getMF()` instead of getParent()->getParent()


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

https://reviews.llvm.org/D123394



More information about the llvm-commits mailing list