[PATCH] D19886: Add ability to use DependenceAnalysis from LoopAccessAnalysis

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 12:53:49 PDT 2016


hfinkel created this revision.
hfinkel added reviewers: anemet, silviu.baranga, karthikthecool.
hfinkel added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, mcrosier, sanjoy.

LoopAccessAnalysis performs dependence analysis for our loop vectorization and other loop transformation passes. Its builtin dependence analysis is fairly simple, and ends up missing a number of common cases. As a result, we end up inserting runtime checks where they're not really needed (or perhaps not vectorizing at all).

LLVM has a more-sophisticated DependenceAnalysis implementation which does catch more of these cases. This patch adds a mode, disabled by default, under which we can use DependenceAnalysis from LoopAccessAnalysis. I've included an example test case in which the use of DependenceAnalysis allows us to elide unnecessary runtime checks.

We should discuss whether we should have, as a general refactoring goal, having LoopAccessAnalysis use DependenceAnalysis for all of its dependence-analysis needs. And if not, why not.

http://reviews.llvm.org/D19886

Files:
  include/llvm/Analysis/LoopAccessAnalysis.h
  lib/Analysis/LoopAccessAnalysis.cpp
  test/Analysis/LoopAccessAnalysis/use-da.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19886.56045.patch
Type: text/x-patch
Size: 8148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160503/22da2277/attachment.bin>


More information about the llvm-commits mailing list