[llvm] r274712 - [PM] Avoid getResult on a higher level in LoopAccessAnalysis

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 16:06:39 PDT 2016


On Sun, Jul 10, 2016 at 5:26 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> Hi Sean,
>
> Can you please explain this? I see that it got rid of a const_cast, but I
> don't understand why this is the right solution.
>

I had the same question in the post-commit thread for r268452.

The key quote from Justin is:

"""
These analyses are function analyses, and a loop pass isn't
allowed to cause a function analysis to run, much like a function pass
isn't allowed to cause a module analysis to be run. They have to stick
to their own level. This enforces correct layering and acts as a
safeguard against accidentally doing extra work.
"""

Essentially, on order to make this layering desire be present in the code,
the outer managers obtained through the proxies (e.g. the
FunctionAnalysisManager obtained through FunctionAnalysisManagerLoopProxy
by a loop pass) are returned as const.

I don't necessarily agree with this, but it is the current state of things.
The point about redundant work is not entirely convincing since there is a
layer of caching. I can sort of sympathize with the layering argument, but
overall my impression is that this is mostly going to be an inconvenience
going forward.

-- Sean Silva


>
> Thanks again,
> Hal
>
> ----- Original Message -----
> > From: "Sean Silva via llvm-commits" <llvm-commits at lists.llvm.org>
> > To: llvm-commits at lists.llvm.org
> > Sent: Wednesday, July 6, 2016 8:01:54 PM
> > Subject: [llvm] r274712 - [PM] Avoid getResult on a higher level in
> LoopAccessAnalysis
> >
> > Author: silvas
> > Date: Wed Jul  6 20:01:53 2016
> > New Revision: 274712
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=274712&view=rev
> > Log:
> > [PM] Avoid getResult on a higher level in LoopAccessAnalysis
> >
> > Note that require<domtree> and require<loops> aren't needed because
> > they
> > come in implicitly via the loop pass manager.
> >
> > Modified:
> >     llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
> >
>  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/lib/Analysis/LoopAccessAnalysis.cpp
> > URL:
> >
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
> > +++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Wed Jul  6
> > 20:01:53 2016
> > @@ -2027,15 +2027,23 @@ INITIALIZE_PASS_END(LoopAccessAnalysis,
> >  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());
> > +  const AnalysisManager<Function> &FAM =
> > +
> >      AM.getResult<FunctionAnalysisManagerLoopProxy>(L).getManager();
> >    Function &F = *L.getHeader()->getParent();
> > -  auto *SE = &FAM.getResult<ScalarEvolutionAnalysis>(F);
> > +  auto *SE = FAM.getCachedResult<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);
> > +  auto *AA = FAM.getCachedResult<AAManager>(F);
> > +  auto *DT = FAM.getCachedResult<DominatorTreeAnalysis>(F);
> > +  auto *LI = FAM.getCachedResult<LoopAnalysis>(F);
> > +  if (!SE)
> > +    report_fatal_error(
> > +        "ScalarEvolution must have been cached at a higher level");
> > +  if (!AA)
> > +    report_fatal_error("AliasAnalysis must have been cached at a
> > higher level");
> > +  if (!DT)
> > +    report_fatal_error("DominatorTree must have been cached at a
> > higher level");
> > +  if (!LI)
> > +    report_fatal_error("LoopInfo must have been cached at a higher
> > level");
> >    const DataLayout &DL = F.getParent()->getDataLayout();
> >    return LoopAccessInfo(&L, SE, DL, TLI, AA, DT, LI);
> >  }
> >
> > 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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll
> > (original)
> > +++
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/backward-dep-different-types.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output < %s
> >  2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/forward-loop-independent.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/independent-interleaved.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll
> > (original)
> > +++
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/memcheck-for-loop-invariant.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&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
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/non-wrapping-pointer.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> >
> -passes='require<aa>,require<scalar-evolution>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll (original)
> > +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/nullptr.ll Wed Jul  6
> > 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze %s  | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/number-of-memchecks.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
> > (original)
> > +++
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/resort-to-memchecks-only.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/reverse-memcheck-bounds.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll
> > (original)
> > +++ llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-no-checks.ll Wed
> > Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> >
> -passes='require<aa>,require<scalar-evolution>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/safe-with-dep-distance.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check2.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt < %s -loop-accesses -analyze  | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/store-to-invariant-check3.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt < %s -loop-accesses -analyze | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/stride-access-dependence.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,loop(print-access-info)'
> > -disable-output  < %s 2>&1 | FileCheck %s
> >
> >  target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
> >
> >
> > 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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-1.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/underlying-objects-2.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll
> > (original)
> > +++
> > llvm/trunk/test/Analysis/LoopAccessAnalysis/unsafe-and-rt-checks.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +1,5 @@
> >  ; RUN: opt -loop-accesses -analyze < %s | FileCheck %s
> > -; RUN: opt -passes='loop(print-access-info)' -disable-output  < %s
> > 2>&1 | FileCheck %s
> > +; RUN: opt
> > -passes='require<scalar-evolution>,require<aa>,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=274712&r1=274711&r2=274712&view=diff
> >
> ==============================================================================
> > ---
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
> > (original)
> > +++
> >
> llvm/trunk/test/Analysis/LoopAccessAnalysis/wrapping-pointer-versioning.ll
> > Wed Jul  6 20:01:53 2016
> > @@ -1,5 +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
> >
> -passes='require<aa>,require<scalar-evolution>,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
> >
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160711/dc18262d/attachment-0001.html>


More information about the llvm-commits mailing list