Skip to content

Commit

Permalink
[LAA] Change name from addRuntimeCheck to addRuntimeChecks, NFC
Browse files Browse the repository at this point in the history
This was requested by Hal in D11205.

llvm-svn: 244540
  • Loading branch information
anemet committed Aug 11, 2015
1 parent a24ff55 commit 5b0a479
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions llvm/include/llvm/Analysis/LoopAccessAnalysis.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class RuntimePointerChecking {
/// \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 *>
Expand Down Expand Up @@ -496,17 +496,17 @@ class LoopAccessInfo {
/// 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.
///
/// Returns a pair of instructions where the first element is the first
/// 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.
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/Analysis/LoopAccessAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1651,7 +1651,7 @@ static SmallVector<std::pair<PointerBounds, PointerBounds>, 4> expandBounds(
return ChecksWithBounds;
}

std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeChecks(
Instruction *Loc,
const SmallVectorImpl<RuntimePointerChecking::PointerCheck> &PointerChecks)
const {
Expand Down Expand Up @@ -1710,12 +1710,12 @@ std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
return std::make_pair(FirstInst, Check);
}

std::pair<Instruction *, Instruction *> LoopAccessInfo::addRuntimeCheck(
Instruction *Loc) const {
std::pair<Instruction *, Instruction *>
LoopAccessInfo::addRuntimeChecks(Instruction *Loc) const {
if (!PtrRtChecking.Need)
return std::make_pair(nullptr, nullptr);

return addRuntimeCheck(Loc, PtrRtChecking.getChecks());
return addRuntimeChecks(Loc, PtrRtChecking.getChecks());
}

LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/LoopVersioning.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ void LoopVersioning::versionLoop(Pass *P) {
// Add the memcheck in the original preheader (this is empty initially).
BasicBlock *MemCheckBB = VersionedLoop->getLoopPreheader();
std::tie(FirstCheckInst, MemRuntimeCheck) =
LAI.addRuntimeCheck(MemCheckBB->getTerminator(), Checks);
LAI.addRuntimeChecks(MemCheckBB->getTerminator(), Checks);
assert(MemRuntimeCheck && "called even though needsAnyChecking = false");

// Rename the block to make the IR more readable.
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2804,7 +2804,7 @@ void InnerLoopVectorizer::createEmptyLoop() {
// faster.
Instruction *MemRuntimeCheck;
std::tie(FirstCheckInst, MemRuntimeCheck) =
Legal->getLAI()->addRuntimeCheck(VectorPH->getTerminator());
Legal->getLAI()->addRuntimeChecks(VectorPH->getTerminator());
if (MemRuntimeCheck) {
AddedSafetyChecks = true;
// Create a new block containing the memory check.
Expand Down

0 comments on commit 5b0a479

Please sign in to comment.