[llvm] r274452 - [PM] Port LoopAccessInfo analysis to new PM
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 3 00:04:22 PDT 2016
> On Jul 2, 2016, at 2:18 PM, Xinliang David Li via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>
> Author: davidxl
> Date: Sat Jul 2 16:18:40 2016
> New Revision: 274452
>
> URL: http://llvm.org/viewvc/llvm-project?rev=274452&view=rev
> Log:
> [PM] Port LoopAccessInfo analysis to new PM
>
> It is implemented as a LoopAnalysis pass as
> discussed and agreed upon.
>
> Modified:
> llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
> llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
> llvm/trunk/lib/Passes/PassBuilder.cpp
> llvm/trunk/lib/Passes/PassRegistry.def
> llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll
> llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
>
> Modified: llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h (original)
> +++ llvm/trunk/include/llvm/Analysis/LoopAccessAnalysis.h Sat Jul 2 16:18:40 2016
> @@ -772,6 +772,28 @@ private:
> LoopInfo *LI;
> };
>
> +/// \brief LoopAccessInfoAnalysis
> +class LoopAccessInfoAnalysis
A real comment? Also I am guessing this will be the new pass class after the PM move, can we have a better name please? How was this done for other analysis passes? I’d like to keep the LAA name after the transition.
Adam
> + : public AnalysisInfoMixin<LoopAccessInfoAnalysis> {
> + friend AnalysisInfoMixin<LoopAccessInfoAnalysis>;
> + static char PassID;
> +
> +public:
> + typedef LoopAccessInfo Result;
> + Result run(Loop &, AnalysisManager<Loop> &);
> + static StringRef name() { return "LoopAccessInfoAnalysis"; }
> +};
> +
> +/// \brief Printer pass for the \c BlockFrequencyInfo results.
> +class LoopAccessInfoPrinterPass
> + : public PassInfoMixin<LoopAccessInfoPrinterPass> {
> + raw_ostream &OS;
> +
> +public:
> + explicit LoopAccessInfoPrinterPass(raw_ostream &OS) : OS(OS) {}
> + PreservedAnalyses run(Loop &L, AnalysisManager<Loop> &AM);
> +};
> +
> inline Instruction *MemoryDepChecker::Dependence::getSource(
> const LoopAccessInfo &LAI) const {
> return LAI.getDepChecker().getMemoryInstructions()[Source];
>
> Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
> +++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Sat Jul 2 16:18:40 2016
> @@ -14,6 +14,7 @@
>
> #include "llvm/Analysis/LoopAccessAnalysis.h"
> #include "llvm/Analysis/LoopInfo.h"
> +#include "llvm/Analysis/LoopPassManager.h"
> #include "llvm/Analysis/ScalarEvolutionExpander.h"
> #include "llvm/Analysis/TargetLibraryInfo.h"
> #include "llvm/Analysis/ValueTracking.h"
> @@ -21,6 +22,7 @@
> #include "llvm/IR/DiagnosticInfo.h"
> #include "llvm/IR/Dominators.h"
> #include "llvm/IR/IRBuilder.h"
> +#include "llvm/IR/PassManager.h"
> #include "llvm/Support/Debug.h"
> #include "llvm/Support/raw_ostream.h"
> using namespace llvm;
> @@ -2022,6 +2024,32 @@ INITIALIZE_PASS_DEPENDENCY(DominatorTree
> INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
> INITIALIZE_PASS_END(LoopAccessAnalysis, LAA_NAME, laa_name, false, true)
>
> +char LoopAccessInfoAnalysis::PassID;
> +
> +LoopAccessInfo LoopAccessInfoAnalysis::run(Loop &L, AnalysisManager<Loop> &AM) {
> + // FIXME: ugly const cast
> + AnalysisManager<Function> &FAM = const_cast<FunctionAnalysisManager &>(
> + AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager());
> + Function &F = *L.getHeader()->getParent();
> + auto *SE = &FAM.getResult<ScalarEvolutionAnalysis>(F);
> + auto *TLI = FAM.getCachedResult<TargetLibraryAnalysis>(F);
> + auto *AA = &FAM.getResult<AAManager>(F);
> + auto *DT = &FAM.getResult<DominatorTreeAnalysis>(F);
> + auto *LI = &FAM.getResult<LoopAnalysis>(F);
> + const DataLayout &DL = F.getParent()->getDataLayout();
> + return LoopAccessInfo(&L, SE, DL, TLI, AA, DT, LI);
> +}
> +
> +PreservedAnalyses LoopAccessInfoPrinterPass::run(Loop &L,
> + AnalysisManager<Loop> &AM) {
> + Function &F = *L.getHeader()->getParent();
> + auto &LAI = AM.getResult<LoopAccessInfoAnalysis>(L);
> + OS << "Loop access info in function '" << F.getName() << "':\n";
> + OS.indent(2) << L.getHeader()->getName() << ":\n";
> + LAI.print(OS, 4);
> + return PreservedAnalyses::all();
> +}
> +
> namespace llvm {
> Pass *createLAAPass() {
> return new LoopAccessAnalysis();
>
> Modified: llvm/trunk/lib/Passes/PassBuilder.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Passes/PassBuilder.cpp (original)
> +++ llvm/trunk/lib/Passes/PassBuilder.cpp Sat Jul 2 16:18:40 2016
> @@ -33,6 +33,7 @@
> #include "llvm/Analysis/GlobalsModRef.h"
> #include "llvm/Analysis/LazyCallGraph.h"
> #include "llvm/Analysis/LazyValueInfo.h"
> +#include "llvm/Analysis/LoopAccessAnalysis.h"
> #include "llvm/Analysis/LoopInfo.h"
> #include "llvm/Analysis/MemoryDependenceAnalysis.h"
> #include "llvm/Analysis/PostDominators.h"
>
> Modified: llvm/trunk/lib/Passes/PassRegistry.def
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Passes/PassRegistry.def?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/lib/Passes/PassRegistry.def (original)
> +++ llvm/trunk/lib/Passes/PassRegistry.def Sat Jul 2 16:18:40 2016
> @@ -171,6 +171,7 @@ FUNCTION_PASS("verify<regions>", RegionI
> #define LOOP_ANALYSIS(NAME, CREATE_PASS)
> #endif
> LOOP_ANALYSIS("no-op-loop", NoOpLoopAnalysis())
> +LOOP_ANALYSIS("access-info", LoopAccessInfoAnalysis())
> #undef LOOP_ANALYSIS
>
> #ifndef LOOP_PASS
> @@ -182,4 +183,5 @@ LOOP_PASS("no-op-loop", NoOpLoopPass())
> LOOP_PASS("print", PrintLoopPass(dbgs()))
> LOOP_PASS("simplify-cfg", LoopSimplifyCFGPass())
> LOOP_PASS("indvars", IndVarSimplifyPass())
> +LOOP_PASS("print-access-info", LoopAccessInfoPrinterPass(dbgs()))
> #undef LOOP_PASS
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; In this loop just because we access A through different types (int, float)
> ; we still have a dependence cycle:
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; for (unsigned i = 0; i < 100; i++) {
> ; A[i+8] = B[i] + 2;
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Check that loop-indepedent forward dependences are discovered properly.
> ;
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt < %s -store-to-load-forwarding-conflict-detection=false -loop-accesses -analyze | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -store-to-load-forwarding-conflict-detection=false -disable-output < %s 2>&1 | FileCheck %s
>
> ; This test checks that we prove the strided accesses to be independent before
> ; concluding that there is a forward dependence.
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Handle memchecks involving loop-invariant addresses:
> ;
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/multiple-strides-rt-memory-checks.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze -S < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; This is the test case from PR26314.
> ; When we were retrying dependence checking with memchecks only,
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -basicaa -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='require<aa>,loop(print-access-info)' -aa-pipeline='basic-aa' -disable-output < %s 2>&1 | FileCheck %s
>
> ; For this loop:
> ; for (int i = 0; i < n; i++)
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Test that the loop accesses are proven safe in this case.
> ; The analyzer uses to be confused by the "diamond" because GetUnderlyingObjects
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
> target triple = "aarch64--linux-gnueabi"
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
>
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; We give up analyzing the dependences in this loop due to non-constant
> ; distance between A[i+offset] and A[i] and add memchecks to prove
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; The runtime memory check code and the access grouping
> ; algorithm both assume that the start and end values
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -basicaa -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='require<aa>,loop(print-access-info)' -aa-pipeline='basic-aa' -disable-output < %s 2>&1 | FileCheck %s
>
> ; If the arrays don't alias this loop is safe with no memchecks:
> ; for (i = 0; i < n; i++)
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Analyze this loop:
> ; for (i = 0; i < n; i++)
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt < %s -loop-accesses -analyze | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Test to confirm LAA will not find store to invariant address.
> ; Inner loop has no store to invariant address.
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt < %s -loop-accesses -analyze | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Test to confirm LAA will find store to invariant address.
> ; Inner loop has a store to invariant address.
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
>
> @@ -384,7 +385,7 @@ for.body:
> ; return sum;
> ; }
>
> -; CHECK: for function 'vectorizable_unscaled_Write_Read':
> +; CHECK: function 'vectorizable_unscaled_Write_Read':
> ; CHECK-NEXT: for.body:
> ; CHECK-NEXT: Memory dependences are safe
> ; CHECK-NEXT: Dependences:
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -basicaa -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; In:
> ;
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -basicaa -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; This loop:
> ;
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> +; RUN: opt -passes='loop(print-access-info)' -disable-output < %s 2>&1 | FileCheck %s
>
> ; Analyze this loop:
> ; for (i = 0; i < n; i++)
>
> Modified: llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll?rev=274452&r1=274451&r2=274452&view=diff
> ==============================================================================
> --- llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll (original)
> +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll Sat Jul 2 16:18:40 2016
> @@ -1,4 +1,5 @@
> ; RUN: opt -basicaa -loop-accesses -analyze < %s | FileCheck %s -check-prefix=LAA
> +; RUN: opt -passes='require<aa>,loop(print-access-info)' -aa-pipeline='basic-aa' -disable-output < %s 2>&1 | FileCheck %s --check-prefix=LAA
> ; RUN: opt -loop-versioning -S < %s | FileCheck %s -check-prefix=LV
>
> target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list