[LAA] Make the set of runtime checks part of the state of LAA, NFC
authorAdam Nemet <anemet@apple.com>
Fri, 7 Aug 2015 22:44:15 +0000 (22:44 +0000)
committerAdam Nemet <anemet@apple.com>
Fri, 7 Aug 2015 22:44:15 +0000 (22:44 +0000)
commit32dd24633dbb1c9b807fe06f194799ebd7c1407b
tree7ee82ee1d625943471a779e056ce342946034091
parentc5f0fbcb1abcce851a6da14db9583674373bd78b
[LAA] Make the set of runtime checks part of the state of LAA, NFC

This is the full set of checks that clients can further filter. IOW,
it's client-agnostic.  This makes LAA complete in the sense that it now
provides the two main results of its analysis precomputed:

1. memory dependences via getDepChecker().getInsterestingDependences()
2. run-time checks via getRuntimePointerCheck().getChecks()

However, as a consequence we now compute this information pro-actively.
Thus if the client decides to skip the loop based on the dependences
we've computed the checks unnecessarily.  In order to see whether this
was a significant overhead I checked compile time on SPEC2k6 LTO bitcode
files.  The change was in the noise.

The checks are generated in canCheckPtrAtRT, at the same place where we
used to call groupChecks to merge checks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244368 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/LoopAccessAnalysis.h
lib/Analysis/LoopAccessAnalysis.cpp
lib/Transforms/Scalar/LoopDistribute.cpp