From 436018c3ffa219d69ca383284e4303107d9edcaf Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Thu, 19 Feb 2015 19:15:00 +0000 Subject: [LoopAccesses] Cache the result of canVectorizeMemory LAA will be an on-demand analysis pass, so we need to cache the result of the analysis. canVectorizeMemory is renamed to analyzeLoop which computes the result. canVectorizeMemory becomes the query function for the cached result. This is part of the patchset that converts LoopAccessAnalysis into an actual analysis pass. llvm-svn: 229892 --- llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/Vectorize/LoopVectorize.cpp') diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 8b671355ebd..2ba7913119f 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -3807,11 +3807,11 @@ void LoopVectorizationLegality::collectLoopUniforms() { } bool LoopVectorizationLegality::canVectorizeMemory() { - bool Success = LAI.canVectorizeMemory(Strides); + LAI.analyzeLoop(Strides); auto &OptionalReport = LAI.getReport(); if (OptionalReport) emitAnalysis(*OptionalReport); - return Success; + return LAI.canVectorizeMemory(); } static bool hasMultipleUsesOf(Instruction *I, -- cgit v1.2.3