llvm.org GIT mirror llvm / 15a7a33
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244421 91177308-0d34-0410-b5e6-96231b3b80d8 Adam Nemet 4 years ago
2 changed file(s) with 7 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
387387
388388 /// \brief Decide if we need to add a check between two groups of pointers,
389389 /// according to needsChecking.
390 bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N,
391 const SmallVectorImpl *PtrPartition) const;
390 bool needsChecking(const CheckingPtrGroup &M,
391 const CheckingPtrGroup &N) const;
392392
393393 /// \brief Returns the number of run-time checks required according to
394394 /// needsChecking.
420420
421421 /// \brief Decide whether we need to issue a run-time check for pointer at
422422 /// index \p I and \p J to prove their independence.
423 ///
424 /// If \p PtrPartition is set, it contains the partition number for
425 /// pointers (-1 if the pointer belongs to multiple partitions). In this
426 /// case omit checks between pointers belonging to the same partition.
427 bool needsChecking(unsigned I, unsigned J,
428 const SmallVectorImpl *PtrPartition = nullptr) const;
423 bool needsChecking(unsigned I, unsigned J) const;
429424
430425 private:
431426 /// \brief Groups pointers such that a single memcheck is required
170170 Checks = generateChecks();
171171 }
172172
173 bool RuntimePointerChecking::needsChecking(
174 const CheckingPtrGroup &M, const CheckingPtrGroup &N,
175 const SmallVectorImpl *PtrPartition) const {
173 bool RuntimePointerChecking::needsChecking(const CheckingPtrGroup &M,
174 const CheckingPtrGroup &N) const {
176175 for (unsigned I = 0, EI = M.Members.size(); EI != I; ++I)
177176 for (unsigned J = 0, EJ = N.Members.size(); EJ != J; ++J)
178 if (needsChecking(M.Members[I], N.Members[J], PtrPartition))
177 if (needsChecking(M.Members[I], N.Members[J]))
179178 return true;
180179 return false;
181180 }
348347 PtrToPartition[PtrIdx1] == PtrToPartition[PtrIdx2]);
349348 }
350349
351 bool RuntimePointerChecking::needsChecking(
352 unsigned I, unsigned J, const SmallVectorImpl *PtrPartition) const {
350 bool RuntimePointerChecking::needsChecking(unsigned I, unsigned J) const {
353351 const PointerInfo &PointerI = Pointers[I];
354352 const PointerInfo &PointerJ = Pointers[J];
355353
363361
364362 // Only need to check pointers in the same alias set.
365363 if (PointerI.AliasSetId != PointerJ.AliasSetId)
366 return false;
367
368 // If PtrPartition is set omit checks between pointers of the same partition.
369 if (PtrPartition && arePointersInSamePartition(*PtrPartition, I, J))
370364 return false;
371365
372366 return true;