summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorAdam Nemet <anemet@apple.com>2015-11-03 20:13:23 +0000
committerAdam Nemet <anemet@apple.com>2015-11-03 20:13:23 +0000
commitb45516e875f5398418cf7e89f20bd41707b52358 (patch)
tree49cab8784c4a4e846ced4af824f7539646b8135f /llvm/lib/Analysis
parentd1ec68241168bc6b02f176f65f9452a8f5c30c82 (diff)
downloadbcm5719-llvm-b45516e875f5398418cf7e89f20bd41707b52358.tar.gz
bcm5719-llvm-b45516e875f5398418cf7e89f20bd41707b52358.zip
[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 llvm-svn: 251972
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LoopAccessAnalysis.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 25025db0527..b4b646f8144 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -911,19 +911,7 @@ bool MemoryDepChecker::Dependence::isSafeForVectorization(DepType Type) {
}
bool MemoryDepChecker::Dependence::isInterestingDependence(DepType Type) {
- switch (Type) {
- case NoDep:
- case Forward:
- return false;
-
- case BackwardVectorizable:
- case Unknown:
- case ForwardButPreventsForwarding:
- case Backward:
- case BackwardVectorizableButPreventsForwarding:
- return true;
- }
- llvm_unreachable("unexpected DepType!");
+ return Type != NoDep;
}
bool MemoryDepChecker::Dependence::isPossiblyBackward() const {
OpenPOWER on IntegriCloud