Change Polly's position to "before-vectorizer"
authorTobias Grosser <tobias@grosser.es>
Mon, 7 Aug 2017 22:33:34 +0000 (22:33 +0000)
committerTobias Grosser <tobias@grosser.es>
Mon, 7 Aug 2017 22:33:34 +0000 (22:33 +0000)
Polly has traditionally always been executed at the beginning of the pass
pipeline as LLVM's inliner and DeLICM passes introduced plenty of scalar
dependences which prevented any kind of useful high-level loop optimizations
later in the pass pipeline. With DeLICM now being available, Polly can also
run optimizations when folded into the pass pipeline. This has the benefit
that Polly should now be more effective on C++ code and as an additional bonus,
no additional early canonicalization phase must be run. As a result, Polly
touches the code only if it applies a transformation. Code that does not
benefit from Polly is not touched and consequently will have the very same
execution time as without Polly enabled. Random performance changes, as could
sometimes be observed with polly-position=early are consequently not possible
any more. If performance is changed, this is due to Polly is choosing to
perform a transformation. If this choice is wrong, it can be fixed directly
in Polly.

http://polly.llvm.org/docs/Architecture.html#polly-in-the-llvm-pass-pipeline

llvm-svn: 310319

polly/lib/Support/RegisterPasses.cpp

index 9a06229..5152858 100644 (file)
@@ -78,7 +78,7 @@ static cl::opt<PassPositionChoice> PassPosition(
                    "After the loop optimizer (but within the inline cycle)"),
         clEnumValN(POSITION_BEFORE_VECTORIZER, "before-vectorizer",
                    "Right before the vectorizer")),
-    cl::Hidden, cl::init(POSITION_EARLY), cl::ZeroOrMore,
+    cl::Hidden, cl::init(POSITION_BEFORE_VECTORIZER), cl::ZeroOrMore,
     cl::cat(PollyCategory));
 
 static cl::opt<OptimizerChoice>