From 5bcbae64045b9e91015421177ffaf79a3cd3fa9d Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Tue, 11 Aug 2015 00:09:37 +0000 Subject: [PATCH] [LAA] Change name from addRuntimeCheck to addRuntimeChecks, NFC This was requested by Hal in D11205. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@244540 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/LoopAccessAnalysis.h | 10 +++++----- lib/Analysis/LoopAccessAnalysis.cpp | 8 ++++---- lib/Transforms/Utils/LoopVersioning.cpp | 2 +- lib/Transforms/Vectorize/LoopVectorize.cpp | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/llvm/Analysis/LoopAccessAnalysis.h b/include/llvm/Analysis/LoopAccessAnalysis.h index 4120263ec67..25da9827eea 100644 --- a/include/llvm/Analysis/LoopAccessAnalysis.h +++ b/include/llvm/Analysis/LoopAccessAnalysis.h @@ -372,7 +372,7 @@ public: /// \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 @@ -496,7 +496,7 @@ public: /// 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 - addRuntimeCheck(Instruction *Loc) const; + addRuntimeChecks(Instruction *Loc) const; /// \brief Generete the instructions for the checks in \p PointerChecks. /// @@ -504,9 +504,9 @@ public: /// 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 - addRuntimeCheck(Instruction *Loc, - const SmallVectorImpl - &PointerChecks) const; + addRuntimeChecks(Instruction *Loc, + const SmallVectorImpl + &PointerChecks) const; /// \brief The diagnostics report generated for the analysis. E.g. why we /// couldn't analyze the loop. diff --git a/lib/Analysis/LoopAccessAnalysis.cpp b/lib/Analysis/LoopAccessAnalysis.cpp index 541aff5c3f4..13d1235710e 100644 --- a/lib/Analysis/LoopAccessAnalysis.cpp +++ b/lib/Analysis/LoopAccessAnalysis.cpp @@ -1651,7 +1651,7 @@ static SmallVector, 4> expandBounds( return ChecksWithBounds; } -std::pair LoopAccessInfo::addRuntimeCheck( +std::pair LoopAccessInfo::addRuntimeChecks( Instruction *Loc, const SmallVectorImpl &PointerChecks) const { @@ -1710,12 +1710,12 @@ std::pair LoopAccessInfo::addRuntimeCheck( return std::make_pair(FirstInst, Check); } -std::pair LoopAccessInfo::addRuntimeCheck( - Instruction *Loc) const { +std::pair +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, diff --git a/lib/Transforms/Utils/LoopVersioning.cpp b/lib/Transforms/Utils/LoopVersioning.cpp index 2fc0771f152..4d2b1ee101f 100644 --- a/lib/Transforms/Utils/LoopVersioning.cpp +++ b/lib/Transforms/Utils/LoopVersioning.cpp @@ -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. diff --git a/lib/Transforms/Vectorize/LoopVectorize.cpp b/lib/Transforms/Vectorize/LoopVectorize.cpp index 37d6add20a2..4b9ec0f7f4a 100644 --- a/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -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. -- 2.34.1