[PATCH] D71027: Support repeated machine outlining

Jin Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 17:31:06 PDT 2020


jinlin marked 3 inline comments as done.
jinlin added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1517
+  unsigned I;
+  for (I = 0; I < NumRepeat; I++) {
+    if (!runOnceOnModule(M, I)) {
----------------
paquette wrote:
> Nit: pull `I` into the loop:
> 
> ```
> for (unsigned I = 0; I < NumRepeat; I++) {
>  // ...
> }
> ```
Done.


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1519-1520
+    if (!runOnceOnModule(M, I)) {
+      LLVM_DEBUG(dbgs() << "Stopped outlining at iteration " << I
+                        << " because no changes were found.\n";);
+      return Changed;
----------------
paquette wrote:
> Can we have a small testcase showing that this happens?
The prefix FOUR-RUN shows that the machine outliner stops at 3rd iteration since no changes were found. 


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1525-1526
+  }
+  LLVM_DEBUG(dbgs() << "Stopped outlining because iteration " << I
+                    << " >= " << NumRepeat << "\n";);
+  return Changed;
----------------
paquette wrote:
> Can we have a small testcase showing that this happens?
The prefix ONE-RUN shows that the machine outliner stops at 1st first iteration since NumRepeat is 1. 


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

https://reviews.llvm.org/D71027





More information about the llvm-commits mailing list