[PATCH] D18710: code hoisting using GVN

Chad Rosier via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 10:59:52 PDT 2016


mcrosier added inline comments.

================
Comment at: llvm/lib/Transforms/Scalar/GVN.cpp:2725
@@ +2724,3 @@
+HoistedScalarsThreshold("hoisted-scalars-threshold", cl::Hidden, cl::init(-1),
+                        cl::ZeroOrMore,
+    cl::desc("Max number of scalar instructions to hoist (default unlimited = -1)"));
----------------
sebpop wrote:
> mcrosier wrote:
> > ZeroOrMore isn't generally used with cl::opt.
> I copied the stmt from above: GVN.cpp line 76.  Do you have an alternative option I should be using?
We should be using the default for cl::opt, which is cl::Optional (i.e., the option may be specified zero or once).  My suggestion is to remove cl::ZeroOrMore from the command line option as this should only be used with cl::list.  Hopefully, that makes sense.


Repository:
  rL LLVM

http://reviews.llvm.org/D18710





More information about the llvm-commits mailing list