diff options
author | Adam Nemet <anemet@apple.com> | 2015-02-18 03:42:50 +0000 |
---|---|---|
committer | Adam Nemet <anemet@apple.com> | 2015-02-18 03:42:50 +0000 |
commit | 5474be2c80a8887e68e22b33b7a3ad6d396e780b (patch) | |
tree | 77d9faf0e61d519860f0f1cb0ed11463fba47900 /llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | |
parent | 4f3ede5a01041aab7cd4d185bdf2cfd2d653a1d2 (diff) | |
download | bcm5719-llvm-5474be2c80a8887e68e22b33b7a3ad6d396e780b.tar.gz bcm5719-llvm-5474be2c80a8887e68e22b33b7a3ad6d396e780b.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: 229623
Diffstat (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp')
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 3f6660203c0..abb38d19ea1 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -556,7 +556,7 @@ public: : NumPredStores(0), TheLoop(L), SE(SE), DL(DL), TLI(TLI), TheFunction(F), TTI(TTI), 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. @@ -3825,7 +3825,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, |