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