[PATCH] D81187: Add cl::ZeroOrMore to get around build system issues

Aditya Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 4 12:42:51 PDT 2020


hiraditya created this revision.
hiraditya added reviewers: spop, alexbdv.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
alexbdv accepted this revision.
alexbdv added a comment.
This revision is now accepted and ready to land.

Thanks for fixing this !


It is quite common to get multiple instances of optimization flags while building. The following optimizations doesn't have cl::ZeroOrMore which causes errors during the build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D81187

Files:
  llvm/lib/Transforms/IPO/PassManagerBuilder.cpp


Index: llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
===================================================================
--- llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -108,7 +108,7 @@
     cl::desc("Enable the experimental Loop Versioning LICM pass"));
 
 static cl::opt<bool>
-    DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden,
+    DisablePreInliner("disable-preinline", cl::init(false), cl::ZeroOrMore,
                       cl::desc("Disable pre-instrumentation inliner"));
 
 static cl::opt<int> PreInlineThreshold(
@@ -117,7 +117,7 @@
              "(default = 75)"));
 
 static cl::opt<bool> EnableGVNHoist(
-    "enable-gvn-hoist", cl::init(false), cl::Hidden,
+    "enable-gvn-hoist", cl::init(false), cl::ZeroOrMore,
     cl::desc("Enable the GVN hoisting pass (default = off)"));
 
 static cl::opt<bool>
@@ -131,7 +131,7 @@
              "cleanup passes integrated into the loop pass manager pipeline."));
 
 static cl::opt<bool> EnableGVNSink(
-    "enable-gvn-sink", cl::init(false), cl::Hidden,
+    "enable-gvn-sink", cl::init(false), cl::ZeroOrMore,
     cl::desc("Enable the GVN sinking pass (default = off)"));
 
 // This option is used in simplifying testing SampleFDO optimizations for


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81187.268555.patch
Type: text/x-patch
Size: 1288 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200604/98cdead8/attachment-0001.bin>


More information about the llvm-commits mailing list