[LAA] Revert a small part of r239295
authorAdam Nemet <anemet@apple.com>
Wed, 8 Jul 2015 22:58:48 +0000 (22:58 +0000)
committerAdam Nemet <anemet@apple.com>
Wed, 8 Jul 2015 22:58:48 +0000 (22:58 +0000)
commit7a6f54545fcb0688018820289338fd30ee72f1fa
tree3b08207eb32f6286472718172c9f6e9daac630b0
parent9a39681fd9fc89a262f6736b878d0422237cd346
[LAA] Revert a small part of r239295

This commit ([LAA] Fix estimation of number of memchecks) regressed the
logic a bit.  We shouldn't quit the analysis if we encounter a pointer
without known bounds *unless* we actually need to emit a memcheck for
it.

The original code was using NumComparisons which is now computed
differently.  Instead I compute NeedRTCheck from NumReadPtrChecks and
NumWritePtrChecks.

As side note, I find the separation of NeedRTCheck and CanDoRT
confusing, so I will try to merge them in a follow-up patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@241756 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LoopAccessAnalysis.cpp
test/Analysis/LoopAccessAnalysis/pointer-with-unknown-bounds.ll [new file with mode: 0644]