[polly] r232100 - Add -polly-vectorizer=stripmine
Tobias Grosser
tobias at grosser.es
Thu Mar 12 13:48:07 PDT 2015
Author: grosser
Date: Thu Mar 12 15:48:07 2015
New Revision: 232100
URL: http://llvm.org/viewvc/llvm-project?rev=232100&view=rev
Log:
Add -polly-vectorizer=stripmine
By strip-mining outer loops to the innermost level we can enable LLVM's loop
vectorizer to vectorize outer loops.
Modified:
polly/trunk/include/polly/CodeGen/CodeGeneration.h
polly/trunk/lib/Support/RegisterPasses.cpp
polly/trunk/test/ScheduleOptimizer/prevectorization.ll
Modified: polly/trunk/include/polly/CodeGen/CodeGeneration.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/CodeGeneration.h?rev=232100&r1=232099&r2=232100&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/CodeGeneration.h (original)
+++ polly/trunk/include/polly/CodeGen/CodeGeneration.h Thu Mar 12 15:48:07 2015
@@ -20,6 +20,7 @@
namespace polly {
enum VectorizerChoice {
VECTORIZER_NONE,
+ VECTORIZER_STRIPMINE,
VECTORIZER_POLLY,
VECTORIZER_UNROLL_ONLY
};
Modified: polly/trunk/lib/Support/RegisterPasses.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Support/RegisterPasses.cpp?rev=232100&r1=232099&r2=232100&view=diff
==============================================================================
--- polly/trunk/lib/Support/RegisterPasses.cpp (original)
+++ polly/trunk/lib/Support/RegisterPasses.cpp Thu Mar 12 15:48:07 2015
@@ -76,12 +76,15 @@ static cl::opt<CodeGenChoice, true> XCod
VectorizerChoice polly::PollyVectorizerChoice;
static cl::opt<polly::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(polly::VECTORIZER_UNROLL_ONLY, "unroll-only",
- "Only grouped unroll the vectorize candidate loops"),
- clEnumValEnd),
+ cl::values(
+ clEnumValN(polly::VECTORIZER_NONE, "none", "No Vectorization"),
+ clEnumValN(polly::VECTORIZER_POLLY, "polly",
+ "Polly internal vectorizer"),
+ clEnumValN(polly::VECTORIZER_STRIPMINE, "stripmine",
+ "Strip-mine outer loops for the loop-vectorizer to trigger"),
+ clEnumValN(polly::VECTORIZER_UNROLL_ONLY, "unroll-only",
+ "Only grouped unroll the vectorize candidate loops"),
+ clEnumValEnd),
cl::location(PollyVectorizerChoice), cl::init(polly::VECTORIZER_NONE),
cl::ZeroOrMore, cl::cat(PollyCategory));
Modified: polly/trunk/test/ScheduleOptimizer/prevectorization.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScheduleOptimizer/prevectorization.ll?rev=232100&r1=232099&r2=232100&view=diff
==============================================================================
--- polly/trunk/test/ScheduleOptimizer/prevectorization.ll (original)
+++ polly/trunk/test/ScheduleOptimizer/prevectorization.ll Thu Mar 12 15:48:07 2015
@@ -1,4 +1,5 @@
; RUN: opt -S %loadPolly -polly-detect-unprofitable -basicaa -polly-opt-isl -polly-vectorizer=polly -polly-ast -analyze < %s | FileCheck %s
+; RUN: opt -S %loadPolly -polly-detect-unprofitable -basicaa -polly-opt-isl -polly-vectorizer=stripmine -polly-ast -analyze < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
More information about the llvm-commits
mailing list