[PATCH] D67687: [NewPM][CodeGen] Introduce machine pass and machine pass manager

Alina Sbirlea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 3 17:01:58 PDT 2020


asbirlea added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/MachinePassManager.h:19
+//
+// `doInitilization`/`doFinalization` are available like they are in legacy pass
+// manager. This is for machine function passes to work on module level
----------------
s/doInitilization/doInitialization


================
Comment at: llvm/include/llvm/CodeGen/MachinePassManager.h:72
+
+  // Query IR function analysis
+  template <typename PassT>
----------------
doxygen comment here and below?


================
Comment at: llvm/lib/CodeGen/MachinePassManager.cpp:44
+
+  for (unsigned Idx = 0, Size = Passes.size(); true;) {
+    // Run machine module passes
----------------
I think it's clearer if this is a `do{}while(true)` with the Idx and Size initialization outside the loop.


================
Comment at: llvm/lib/CodeGen/MachinePassManager.cpp:64
+      ;
+    unsigned End = Idx;
+
----------------
Use Idx directly below?


================
Comment at: llvm/lib/CodeGen/MachinePassManager.cpp:75
+
+      for (unsigned I = Begin, E = End; I != E; ++I) {
+        auto *P = Passes[I].get();
----------------
```
for (;Begin != Idx; ++Begin) {
  ... Passes[Begin]
...
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67687



More information about the llvm-commits mailing list