/// \brief A memcheck which made up of a pair of grouped pointers.
///
/// These *have* to be const for now, since checks are generated from
- /// CheckingPtrGroups in LAI::addRuntimeCheck which is a const member
+ /// CheckingPtrGroups in LAI::addRuntimeChecks which is a const member
/// function. FIXME: once check-generation is moved inside this class (after
/// the PtrPartition hack is removed), we could drop const.
typedef std::pair<const CheckingPtrGroup *, const CheckingPtrGroup *>
bool UseDependencies);
/// \brief Returns the checks that generateChecks created.
- const SmallVectorImpl<PointerCheck> &getChecks() const { return Checks; }
+ const SmallVector<PointerCheck, 4> &getChecks() const { return Checks; }
/// \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,
- const SmallVectorImpl<int> *PtrPartition) const;
+ bool needsChecking(const CheckingPtrGroup &M,
+ const CheckingPtrGroup &N) const;
/// \brief Returns the number of run-time checks required according to
/// needsChecking.
/// \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 = nullptr) const;
+ bool needsChecking(unsigned I, unsigned J) const;
private:
/// \brief Groups pointers such that a single memcheck is required
/// instruction generated in possibly a sequence of instructions and the
/// second value is the final comparator value or NULL if no check is needed.
std::pair<Instruction *, Instruction *>
- addRuntimeCheck(Instruction *Loc) const;
+ addRuntimeChecks(Instruction *Loc) const;
/// \brief Generete the instructions for the checks in \p PointerChecks.
///
/// instruction generated in possibly a sequence of instructions and the
/// second value is the final comparator value or NULL if no check is needed.
std::pair<Instruction *, Instruction *>
- addRuntimeCheck(Instruction *Loc,
- const SmallVectorImpl<RuntimePointerChecking::PointerCheck>
- &PointerChecks) const;
+ addRuntimeChecks(Instruction *Loc,
+ const SmallVectorImpl<RuntimePointerChecking::PointerCheck>
+ &PointerChecks) const;
/// \brief The diagnostics report generated for the analysis. E.g. why we
/// couldn't analyze the loop.