Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit c2944f6

Browse files
committed
[LAA] Turn RuntimePointerChecking into a class, start hiding things, NFC
The goal is to start hiding internal APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242220 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 00b675d commit c2944f6

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -292,9 +292,10 @@ class MemoryDepChecker {
292292
bool couldPreventStoreLoadForward(unsigned Distance, unsigned TypeByteSize);
293293
};
294294

295-
/// This struct holds information about the memory runtime legality check that
296-
/// a group of pointers do not overlap.
297-
struct RuntimePointerChecking {
295+
/// \brief Holds information about the memory runtime legality checks to verify
296+
/// that a group of pointers do not overlap.
297+
class RuntimePointerChecking {
298+
public:
298299
struct PointerInfo {
299300
/// Holds the pointer value that we need to check.
300301
TrackingVH<Value> PointerValue;
@@ -374,15 +375,6 @@ struct RuntimePointerChecking {
374375
void groupChecks(MemoryDepChecker::DepCandidates &DepCands,
375376
bool UseDependencies);
376377

377-
/// \brief Decide whether we need to issue a run-time check for pointer at
378-
/// index \p I and \p J to prove their independence.
379-
///
380-
/// If \p PtrPartition is set, it contains the partition number for
381-
/// pointers (-1 if the pointer belongs to multiple partitions). In this
382-
/// case omit checks between pointers belonging to the same partition.
383-
bool needsChecking(unsigned I, unsigned J,
384-
const SmallVectorImpl<int> *PtrPartition) const;
385-
386378
/// \brief Decide if we need to add a check between two groups of pointers,
387379
/// according to needsChecking.
388380
bool needsChecking(const CheckingPtrGroup &M, const CheckingPtrGroup &N,
@@ -413,6 +405,16 @@ struct RuntimePointerChecking {
413405
/// Holds a partitioning of pointers into "check groups".
414406
SmallVector<CheckingPtrGroup, 2> CheckingGroups;
415407

408+
private:
409+
/// \brief Decide whether we need to issue a run-time check for pointer at
410+
/// index \p I and \p J to prove their independence.
411+
///
412+
/// If \p PtrPartition is set, it contains the partition number for
413+
/// pointers (-1 if the pointer belongs to multiple partitions). In this
414+
/// case omit checks between pointers belonging to the same partition.
415+
bool needsChecking(unsigned I, unsigned J,
416+
const SmallVectorImpl<int> *PtrPartition) const;
417+
416418
/// Holds a pointer to the ScalarEvolution analysis.
417419
ScalarEvolution *SE;
418420
};

0 commit comments

Comments
 (0)