diff options
| author | Adam Nemet <anemet@apple.com> | 2015-07-14 22:32:52 +0000 |
|---|---|---|
| committer | Adam Nemet <anemet@apple.com> | 2015-07-14 22:32:52 +0000 |
| commit | 3f3fd8d5c388c4acb2be1ea7cfd815303b85609c (patch) | |
| tree | 06a1f6e2adb820d7c0761405de9310a7ec2350f7 /llvm | |
| parent | 9f7dedc376155794c8c227192dcdab7f9bc2e517 (diff) | |
| download | bcm5719-llvm-3f3fd8d5c388c4acb2be1ea7cfd815303b85609c.tar.gz bcm5719-llvm-3f3fd8d5c388c4acb2be1ea7cfd815303b85609c.zip | |
[LAA] Turn RuntimePointerChecking into a class, start hiding things, NFC
The goal is to start hiding internal APIs.
llvm-svn: 242220
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Analysis/LoopAccessAnalysis.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h index 4e23e459fc6..476e4b6686b 100644 --- a/llvm/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/llvm/include/llvm/Analysis/LoopAccessAnalysis.h @@ -292,9 +292,10 @@ private: bool couldPreventStoreLoadForward(unsigned Distance, unsigned TypeByteSize); }; -/// This struct holds information about the memory runtime legality check that -/// a group of pointers do not overlap. -struct RuntimePointerChecking { +/// \brief Holds information about the memory runtime legality checks to verify +/// that a group of pointers do not overlap. +class RuntimePointerChecking { +public: struct PointerInfo { /// Holds the pointer value that we need to check. TrackingVH<Value> PointerValue; @@ -374,15 +375,6 @@ struct RuntimePointerChecking { void groupChecks(MemoryDepChecker::DepCandidates &DepCands, bool UseDependencies); - /// \brief Decide whether we need to issue a run-time check for pointer at - /// index \p I and \p J to prove their independence. - /// - /// 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) 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, @@ -413,6 +405,16 @@ struct RuntimePointerChecking { /// Holds a partitioning of pointers into "check groups". SmallVector<CheckingPtrGroup, 2> CheckingGroups; +private: + /// \brief Decide whether we need to issue a run-time check for pointer at + /// index \p I and \p J to prove their independence. + /// + /// 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) const; + /// Holds a pointer to the ScalarEvolution analysis. ScalarEvolution *SE; }; |

