mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-02 18:06:17 +00:00
[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
This commit is contained in:
parent
00b675df73
commit
c2944f6690
@ -292,9 +292,10 @@ private:
|
|||||||
bool couldPreventStoreLoadForward(unsigned Distance, unsigned TypeByteSize);
|
bool couldPreventStoreLoadForward(unsigned Distance, unsigned TypeByteSize);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// This struct holds information about the memory runtime legality check that
|
/// \brief Holds information about the memory runtime legality checks to verify
|
||||||
/// a group of pointers do not overlap.
|
/// that a group of pointers do not overlap.
|
||||||
struct RuntimePointerChecking {
|
class RuntimePointerChecking {
|
||||||
|
public:
|
||||||
struct PointerInfo {
|
struct PointerInfo {
|
||||||
/// Holds the pointer value that we need to check.
|
/// Holds the pointer value that we need to check.
|
||||||
TrackingVH<Value> PointerValue;
|
TrackingVH<Value> PointerValue;
|
||||||
@ -374,15 +375,6 @@ struct RuntimePointerChecking {
|
|||||||
void groupChecks(MemoryDepChecker::DepCandidates &DepCands,
|
void groupChecks(MemoryDepChecker::DepCandidates &DepCands,
|
||||||
bool UseDependencies);
|
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,
|
/// \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 CheckingPtrGroup &N,
|
||||||
@ -413,6 +405,16 @@ struct RuntimePointerChecking {
|
|||||||
/// Holds a partitioning of pointers into "check groups".
|
/// Holds a partitioning of pointers into "check groups".
|
||||||
SmallVector<CheckingPtrGroup, 2> CheckingGroups;
|
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.
|
/// Holds a pointer to the ScalarEvolution analysis.
|
||||||
ScalarEvolution *SE;
|
ScalarEvolution *SE;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user