summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Vectorize
diff options
context:
space:
mode:
authorVivek Pandya <vivekvpandya@gmail.com>2017-09-15 19:53:54 +0000
committerVivek Pandya <vivekvpandya@gmail.com>2017-09-15 19:53:54 +0000
commitdf8598dcc46bde61fd70e2a39b6b8a067cc8be4a (patch)
tree2e1611061b39e36c315db9964457895cf2770aaa /llvm/lib/Transforms/Vectorize
parent8b0bbc6fe03b50a87312902ed9ae2a09c5735889 (diff)
downloadbcm5719-llvm-df8598dcc46bde61fd70e2a39b6b8a067cc8be4a.tar.gz
bcm5719-llvm-df8598dcc46bde61fd70e2a39b6b8a067cc8be4a.zip
This reverts r313381
llvm-svn: 313387
Diffstat (limited to 'llvm/lib/Transforms/Vectorize')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index d339143bf64..a37c877db1e 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -4957,15 +4957,12 @@ bool LoopVectorizationLegality::canVectorize() {
// Store the result and return it at the end instead of exiting early, in case
// allowExtraAnalysis is used to report multiple reasons for not vectorizing.
bool Result = true;
-
- bool DoExtraAnalysis = ORE->allowExtraAnalysis(DEBUG_TYPE);
- if (DoExtraAnalysis)
// We must have a loop in canonical form. Loops with indirectbr in them cannot
// be canonicalized.
if (!TheLoop->getLoopPreheader()) {
ORE->emit(createMissedAnalysis("CFGNotUnderstood")
<< "loop control flow is not understood by vectorizer");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -4978,7 +4975,7 @@ bool LoopVectorizationLegality::canVectorize() {
if (!TheLoop->empty()) {
ORE->emit(createMissedAnalysis("NotInnermostLoop")
<< "loop is not the innermost loop");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -4988,7 +4985,7 @@ bool LoopVectorizationLegality::canVectorize() {
if (TheLoop->getNumBackEdges() != 1) {
ORE->emit(createMissedAnalysis("CFGNotUnderstood")
<< "loop control flow is not understood by vectorizer");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -4998,7 +4995,7 @@ bool LoopVectorizationLegality::canVectorize() {
if (!TheLoop->getExitingBlock()) {
ORE->emit(createMissedAnalysis("CFGNotUnderstood")
<< "loop control flow is not understood by vectorizer");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -5010,7 +5007,7 @@ bool LoopVectorizationLegality::canVectorize() {
if (TheLoop->getExitingBlock() != TheLoop->getLoopLatch()) {
ORE->emit(createMissedAnalysis("CFGNotUnderstood")
<< "loop control flow is not understood by vectorizer");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -5024,7 +5021,7 @@ bool LoopVectorizationLegality::canVectorize() {
unsigned NumBlocks = TheLoop->getNumBlocks();
if (NumBlocks != 1 && !canVectorizeWithIfConvert()) {
DEBUG(dbgs() << "LV: Can't if-convert the loop.\n");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -5033,7 +5030,7 @@ bool LoopVectorizationLegality::canVectorize() {
// Check if we can vectorize the instructions and CFG in this loop.
if (!canVectorizeInstrs()) {
DEBUG(dbgs() << "LV: Can't vectorize the instructions or CFG\n");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -5042,7 +5039,7 @@ bool LoopVectorizationLegality::canVectorize() {
// Go over each instruction and look at memory deps.
if (!canVectorizeMemory()) {
DEBUG(dbgs() << "LV: Can't vectorize due to memory conflicts\n");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
@@ -5073,7 +5070,7 @@ bool LoopVectorizationLegality::canVectorize() {
<< "Too many SCEV assumptions need to be made and checked "
<< "at runtime");
DEBUG(dbgs() << "LV: Too many SCEV checks needed.\n");
- if (DoExtraAnalysis)
+ if (ORE->allowExtraAnalysis())
Result = false;
else
return false;
OpenPOWER on IntegriCloud