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

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 27 02:58:53 PDT 2022


jonpa marked an inline comment as done.
jonpa added inline comments.


================
Comment at: llvm/lib/CodeGen/PrologEpilogInserter.cpp:1514
+// Slow version for now: Update live-in lists and clear kill flags after each
+// removal of a redundant definition. Not sure how important kill-flags are
+// after PEI, but this clears them carefully on each user. TODO: This should
----------------
arsenm wrote:
> If PEI's loop was reversed and scavenge register backwards was used, we wouldn't need kill flags at all
Thanks for review. That is a good point, but I have discovered that not only address anchors from Frame Indices lowering that can be found redundant and cleaned, but also many (more) immediate loads. So changing PEI would not handle all cases, unfortunately.

I have asked before here if this should be part of PEI or become a separate pass, but so far we have not agreed on anything. Given the above, it seems to me now more reasonable to have this as a separate pass run before MachineCopyPropagation. Does this make sense to you?




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

https://reviews.llvm.org/D123394



More information about the llvm-commits mailing list