[PATCH] D147532: [MachineLateInstrsCleanup] Improve compile time for huge functions.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 16:04:33 PDT 2023


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp:47
+  struct Reg2MIMap : public std::map<Register, MachineInstr *> {
+    MachineInstr *get(Register Reg) {
+      auto I = find(Reg);
----------------
this just std::map::lookup?


================
Comment at: llvm/lib/CodeGen/MachineLateInstrsCleanup.cpp:54
+      MachineInstr *mi = get(Reg);
+      return mi ? mi->isIdenticalTo(*MI) : false;
+    }
----------------
`return mi && mi->isIdenticalTo(*MI)`


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

https://reviews.llvm.org/D147532



More information about the llvm-commits mailing list