[LAA-memchecks 2/3] Move number of memcheck threshold checking to LV
authorAdam Nemet <anemet@apple.com>
Tue, 10 Mar 2015 18:54:23 +0000 (18:54 +0000)
committerAdam Nemet <anemet@apple.com>
Tue, 10 Mar 2015 18:54:23 +0000 (18:54 +0000)
commitc320ed14d22f300f001662cd8c3d1538524f0e25
tree4b4a86f6e685dce9f2ce0df113ed48064812f270
parent17c9aca8564235e939f23205839776f54082f8da
[LAA-memchecks 2/3] Move number of memcheck threshold checking to LV

Now the analysis won't "fail" if the memchecks exceed the threshold.  It
is the transform pass' responsibility to perform the check.

This allows the transform pass to further analyze/eliminate the
memchecks.  E.g. in Loop distribution we only need to check pointers
that end up in different partitions.

Note that there is a slight change of functionality here.  The logic in
analyzeLoop is that if dependence checking fails due to non-constant
distance between the pointers, another attempt is made to prove safety
of the dependences purely using run-time checks.

Before this patch we could fail the loop due to exceeding the memcheck
threshold after the first step, now we only check the threshold in the
client after the full analysis.  There is no measurable compile-time
effect but I wanted to record this here.

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