[PATCH] D119809: [polly][NFC] removes using-directives to fix modules build

Christopher Di Bella via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 23:51:55 PST 2022


cjdb updated this revision to Diff 408725.
cjdb added a comment.

creates namespace alias


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119809

Files:
  polly/lib/Support/RegisterPasses.cpp


Index: polly/lib/Support/RegisterPasses.cpp
===================================================================
--- polly/lib/Support/RegisterPasses.cpp
+++ polly/lib/Support/RegisterPasses.cpp
@@ -48,12 +48,12 @@
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
 
-using namespace llvm;
-using namespace polly;
+namespace cl = llvm::cl;
 
 cl::OptionCategory PollyCategory("Polly Options",
                                  "Configure the polly loop optimizer");
 
+namespace polly {
 static cl::opt<bool>
     PollyEnabled("polly",
                  cl::desc("Enable the polly optimizer (with -O1, -O2 or -O3)"),
@@ -112,17 +112,17 @@
                           ),
            cl::init(TARGET_CPU), cl::ZeroOrMore, cl::cat(PollyCategory));
 
-VectorizerChoice polly::PollyVectorizerChoice;
-static cl::opt<polly::VectorizerChoice, true> Vectorizer(
+VectorizerChoice PollyVectorizerChoice;
+
+static cl::opt<VectorizerChoice, true> Vectorizer(
     "polly-vectorizer", cl::desc("Select the vectorization strategy"),
     cl::values(
-        clEnumValN(polly::VECTORIZER_NONE, "none", "No Vectorization"),
-        clEnumValN(polly::VECTORIZER_POLLY, "polly",
-                   "Polly internal vectorizer"),
+        clEnumValN(VECTORIZER_NONE, "none", "No Vectorization"),
+        clEnumValN(VECTORIZER_POLLY, "polly", "Polly internal vectorizer"),
         clEnumValN(
-            polly::VECTORIZER_STRIPMINE, "stripmine",
+            VECTORIZER_STRIPMINE, "stripmine",
             "Strip-mine outer loops for the loop-vectorizer to trigger")),
-    cl::location(PollyVectorizerChoice), cl::init(polly::VECTORIZER_NONE),
+    cl::location(PollyVectorizerChoice), cl::init(VECTORIZER_NONE),
     cl::ZeroOrMore, cl::cat(PollyCategory));
 
 static cl::opt<bool> ImportJScop(
@@ -237,7 +237,6 @@
 static StaticInitializer InitializeEverything;
 } // end of anonymous namespace.
 
-namespace polly {
 void initializePollyPasses(PassRegistry &Registry) {
   initializeCodeGenerationPass(Registry);
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119809.408725.patch
Type: text/x-patch
Size: 2043 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220215/91b241ce/attachment.bin>


More information about the llvm-commits mailing list