[PATCH] D69446: [llvm][MachineOutliner] Add support for repeating machine outliner N times.

Puyan Lotfi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 28 13:31:49 PDT 2019


plotfi marked 8 inline comments as done.
plotfi added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:100
+static cl::opt<unsigned> Iterations(
+    "outlining-iteration", cl::init(1), cl::Hidden,
+    cl::desc("Total number of outlining iterations to perform"));
----------------
paquette wrote:
> paquette wrote:
> > Maybe "outlining-iterations" to imply that it's something plural?
> What should happen if this is set to 0? Is there a way to specify a minimum value here?
I changed it to "outliner-reruns", so 0 just means don't do any reruns. This way it has to run the outliner at least once. 


================
Comment at: llvm/lib/CodeGen/MachineOutliner.cpp:1438
 
+  if (Iterations > 1) {
+    bool Changed = false;
----------------
paquette wrote:
> I don't think this `if` is necessary. Since `Iterations` is 1 by default, the loop should only run once when `Iterations` is not specified.
I've decided for now that it would be good to keep the reruning aspect of this patch separate from the existing behavior. I'm still looking to add some good tests here, stay tuned. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69446





More information about the llvm-commits mailing list