diff options
author | Roman Gareev <gareevroman@gmail.com> | 2017-08-22 17:38:46 +0000 |
---|---|---|
committer | Roman Gareev <gareevroman@gmail.com> | 2017-08-22 17:38:46 +0000 |
commit | 0956a606ffb17395f02a58ff7893b0297dcd9875 (patch) | |
tree | d846c1bd1883a7abe01e3b8fd071614f97ed5190 /polly/lib/CodeGen/LoopGenerators.cpp | |
parent | 595b77bc0b15000f9b8f0d75ddddb55d2aaaa59a (diff) | |
download | bcm5719-llvm-0956a606ffb17395f02a58ff7893b0297dcd9875.tar.gz bcm5719-llvm-0956a606ffb17395f02a58ff7893b0297dcd9875.zip |
Disable the Loop Vectorizer in case of GEMM
Currently, in case of GEMM and the pattern matching based optimizations, we
use only the SLP Vectorizer out of two LLVM vectorizers. Since the Loop
Vectorizer can get in the way of optimal code generation, we disable the Loop
Vectorizer for the innermost loop using mark nodes and emitting the
corresponding metadata.
Reviewed-by: Tobias Grosser <tobias@grosser.es>
Differential Revision: https://reviews.llvm.org/D36928
llvm-svn: 311473
Diffstat (limited to 'polly/lib/CodeGen/LoopGenerators.cpp')
-rw-r--r-- | polly/lib/CodeGen/LoopGenerators.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/LoopGenerators.cpp b/polly/lib/CodeGen/LoopGenerators.cpp index 483a994eda3..42f7e6710aa 100644 --- a/polly/lib/CodeGen/LoopGenerators.cpp +++ b/polly/lib/CodeGen/LoopGenerators.cpp @@ -56,8 +56,8 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, PollyIRBuilder &Builder, LoopInfo &LI, DominatorTree &DT, BasicBlock *&ExitBB, ICmpInst::Predicate Predicate, - ScopAnnotator *Annotator, bool Parallel, - bool UseGuard) { + ScopAnnotator *Annotator, bool Parallel, bool UseGuard, + bool LoopVectDisabled) { Function *F = Builder.GetInsertBlock()->getParent(); LLVMContext &Context = F->getContext(); @@ -132,7 +132,7 @@ Value *polly::createLoop(Value *LB, Value *UB, Value *Stride, // Create the loop latch and annotate it as such. BranchInst *B = Builder.CreateCondBr(LoopCondition, HeaderBB, ExitBB); if (Annotator) - Annotator->annotateLoopLatch(B, NewLoop, Parallel); + Annotator->annotateLoopLatch(B, NewLoop, Parallel, LoopVectDisabled); IV->addIncoming(IncrementedIV, HeaderBB); if (GuardBB) |