forked from OSchip/llvm-project
[LAA] Remove unused pointer partition argument from needsChecking(), NFC
This is no longer used in any of the callers. Also remove the logic of handling this argument. llvm-svn: 244421
This commit is contained in:
parent
385308877c
commit
651a5a2401
|
@ -388,8 +388,8 @@ public:
|
||||||
|
|
||||||
/// \brief Decide if we need to add a check between two groups of pointers,
|
/// \brief Decide if we need to add a check between two groups of pointers,
|
||||||
/// according to needsChecking.
|
/// according to needsChecking.
|
||||||
bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N,
|
bool needsChecking(const CheckingPtrGroup &M,
|
||||||
const SmallVectorImpl<int> *PtrPartition) const;
|
const CheckingPtrGroup &N) const;
|
||||||
|
|
||||||
/// \brief Returns the number of run-time checks required according to
|
/// \brief Returns the number of run-time checks required according to
|
||||||
/// needsChecking.
|
/// needsChecking.
|
||||||
|
@ -421,12 +421,7 @@ public:
|
||||||
|
|
||||||
/// \brief Decide whether we need to issue a run-time check for pointer at
|
/// \brief Decide whether we need to issue a run-time check for pointer at
|
||||||
/// index \p I and \p J to prove their independence.
|
/// index \p I and \p J to prove their independence.
|
||||||
///
|
bool needsChecking(unsigned I, unsigned J) const;
|
||||||
/// If \p PtrPartition is set, it contains the partition number for
|
|
||||||
/// pointers (-1 if the pointer belongs to multiple partitions). In this
|
|
||||||
/// case omit checks between pointers belonging to the same partition.
|
|
||||||
bool needsChecking(unsigned I, unsigned J,
|
|
||||||
const SmallVectorImpl<int> *PtrPartition = nullptr) const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// \brief Groups pointers such that a single memcheck is required
|
/// \brief Groups pointers such that a single memcheck is required
|
||||||
|
|
|
@ -171,12 +171,11 @@ void RuntimePointerChecking::generateChecks(
|
||||||
Checks = generateChecks();
|
Checks = generateChecks();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuntimePointerChecking::needsChecking(
|
bool RuntimePointerChecking::needsChecking(const CheckingPtrGroup &M,
|
||||||
const CheckingPtrGroup &M, const CheckingPtrGroup &N,
|
const CheckingPtrGroup &N) const {
|
||||||
const SmallVectorImpl<int> *PtrPartition) const {
|
|
||||||
for (unsigned I = 0, EI = M.Members.size(); EI != I; ++I)
|
for (unsigned I = 0, EI = M.Members.size(); EI != I; ++I)
|
||||||
for (unsigned J = 0, EJ = N.Members.size(); EJ != J; ++J)
|
for (unsigned J = 0, EJ = N.Members.size(); EJ != J; ++J)
|
||||||
if (needsChecking(M.Members[I], N.Members[J], PtrPartition))
|
if (needsChecking(M.Members[I], N.Members[J]))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -349,8 +348,7 @@ bool RuntimePointerChecking::arePointersInSamePartition(
|
||||||
PtrToPartition[PtrIdx1] == PtrToPartition[PtrIdx2]);
|
PtrToPartition[PtrIdx1] == PtrToPartition[PtrIdx2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RuntimePointerChecking::needsChecking(
|
bool RuntimePointerChecking::needsChecking(unsigned I, unsigned J) const {
|
||||||
unsigned I, unsigned J, const SmallVectorImpl<int> *PtrPartition) const {
|
|
||||||
const PointerInfo &PointerI = Pointers[I];
|
const PointerInfo &PointerI = Pointers[I];
|
||||||
const PointerInfo &PointerJ = Pointers[J];
|
const PointerInfo &PointerJ = Pointers[J];
|
||||||
|
|
||||||
|
@ -366,10 +364,6 @@ bool RuntimePointerChecking::needsChecking(
|
||||||
if (PointerI.AliasSetId != PointerJ.AliasSetId)
|
if (PointerI.AliasSetId != PointerJ.AliasSetId)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If PtrPartition is set omit checks between pointers of the same partition.
|
|
||||||
if (PtrPartition && arePointersInSamePartition(*PtrPartition, I, J))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue