summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2015-02-19 19:14:56 +0000
committerAdam Nemet <anemet@apple.com>2015-02-19 19:14:56 +0000
commitc922853b931869e9c76ed06395add273c3af102a (patch)
tree2b99c017a8502e4dd53ffe4747f5880c6b4f49f9 /llvm/lib/Transforms
parentf219c6472355e0b5d207281e1fb19031c90998d2 (diff)
downloadbcm5719-llvm-c922853b931869e9c76ed06395add273c3af102a.tar.gz
bcm5719-llvm-c922853b931869e9c76ed06395add273c3af102a.zip
[LoopAccesses] Stash the report from the analysis rather than emitting it
The transformation passes will query this and then emit them as part of their own report. The currently only user LV is modified to do just that. This is part of the patchset that converts LoopAccessAnalysis into an actual analysis pass. llvm-svn: 229891
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Vectorize/LoopVectorize.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index f53c913c647..8b671355ebd 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -535,7 +535,7 @@ public:
: NumPredStores(0), TheLoop(L), SE(SE), DL(DL),
TLI(TLI), TheFunction(F), TTI(TTI), DT(DT), Induction(nullptr),
WidestIndTy(nullptr),
- LAI(F, L, SE, DL, TLI, AA, DT),
+ LAI(L, SE, DL, TLI, AA, DT),
HasFunNoNaNAttr(false) {}
/// This enum represents the kinds of reductions that we support.
@@ -3807,7 +3807,11 @@ void LoopVectorizationLegality::collectLoopUniforms() {
}
bool LoopVectorizationLegality::canVectorizeMemory() {
- return LAI.canVectorizeMemory(Strides);
+ bool Success = LAI.canVectorizeMemory(Strides);
+ auto &OptionalReport = LAI.getReport();
+ if (OptionalReport)
+ emitAnalysis(*OptionalReport);
+ return Success;
}
static bool hasMultipleUsesOf(Instruction *I,
OpenPOWER on IntegriCloud