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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 17 15:35:41 PST 2022


jonpa 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
----------------
craig.topper wrote:
> Can we use RPOT(reverse post order traversal)? That will guarantee this property except for loops.
Yes - awesome!

55 lines of iteration logic removed, about the same amount of success (even very slightly better on SPEC), and improved compile time (ave 0.57% -> 0.50%).



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

https://reviews.llvm.org/D123394



More information about the llvm-commits mailing list