[PATCH] D86972: [IRSim] Adding a basic similarity identifier.

Jon Roelofs via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 09:17:47 PDT 2020


jroelofs accepted this revision.
jroelofs added a comment.
This revision is now accepted and ready to land.

small nits, otherwise LGTM



================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:260
+  // to sort them by the potential number of instructions to be outlined
+  if (SimilarityCandidates.size() > 1)
+    llvm::stable_sort(SimilarityCandidates,
----------------
I think this check is unnecessary. Sorting one element is already a no-op.


================
Comment at: llvm/lib/Transforms/IPO/IROutliner.cpp:275
+
+    // We pruned the number of regions to 0 to 1, meaning that it's not worth
+    // trying to outlined since there is no compatible similar instance of this
----------------



================
Comment at: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp:107
+cl::opt<bool> EnableIROutliner("ir-outliner", cl::init(false), cl::Hidden,
+    cl::desc("Enable ir outliner pass"));
+
----------------



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

https://reviews.llvm.org/D86972



More information about the llvm-commits mailing list