[LAA] LLE 1/6: Expose Forward dependences
authorAdam Nemet <anemet@apple.com>
Tue, 3 Nov 2015 20:13:23 +0000 (20:13 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 3 Nov 2015 20:13:23 +0000 (20:13 +0000)
commit26abcb32772f9d7a198612a9d1ac5f437a3f8da1
tree80e527d95852e8dab58b9f7fa334a91bc0290e2f
parent556ddccf740f5142a3e3ff94ae0bd819c8c6e161
[LAA] LLE 1/6: Expose Forward dependences

Summary:
Before this change, we didn't use to collect forward dependences since
none of the current clients (LV, LDist) required them.

The motivation to also collect forward dependences is a new pass
LoopLoadElimination (LLE) which discovers store-to-load forwarding
opportunities across the loop's backedge.  The pass uses both lexically
forward or backward loop-carried dependences to detect these
opportunities.

The new pass also analyzes loop-independent (forward) dependences since
they can conflict with the loop-carried dependences in terms of how the
data flows through memory.

The newly added test only covers loop-carried forward dependences
because loop-independent ones are currently categorized as NoDep.  The
next patch will fix this.

The two patches were tested together for compile-time regression.  None
found in LNT/SPEC.

Note that with this change LAA provides all dependences rather than just
"interesting" ones.  A subsequent NFC patch will remove the now trivial
isInterestingDependence and rename the APIs.

Reviewers: hfinkel

Subscribers: jmolloy, rengolin, llvm-commits

Differential Revision: http://reviews.llvm.org/D13254

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251972 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LoopAccessAnalysis.cpp
test/Analysis/LoopAccessAnalysis/forward-loop-carried.ll [new file with mode: 0644]
test/Analysis/LoopAccessAnalysis/safe-no-checks.ll