[LAA] Split out a helper from addRuntimeCheck to generate the check, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243312 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Adam Nemet
2015-07-27 19:38:48 +00:00
parent 6e208e96cc
commit 1829d59a2e
2 changed files with 27 additions and 14 deletions

View File

@@ -384,6 +384,15 @@ public:
void groupChecks(MemoryDepChecker::DepCandidates &DepCands,
bool UseDependencies);
/// Generate the checks and return them.
///
/// \p PtrToPartition contains the partition number for pointers. If passed,
/// omit checks between pointers belonging to the same partition. Partition
/// number -1 means that the pointer is used in multiple partitions. In this
/// case we can't safely omit the check.
SmallVector<PointerCheck, 4>
generateChecks(const SmallVectorImpl<int> *PtrPartition = nullptr) const;
/// \brief Decide if we need to add a check between two groups of pointers,
/// according to needsChecking.
bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N,