[llvm] r313951 - Rename markAsErased to erase, as pointed out in a previous review; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 21 18:47:41 PDT 2017
Author: sanjoy
Date: Thu Sep 21 18:47:41 2017
New Revision: 313951
URL: http://llvm.org/viewvc/llvm-project?rev=313951&view=rev
Log:
Rename markAsErased to erase, as pointed out in a previous review; NFC
Modified:
llvm/trunk/include/llvm/Analysis/LoopInfo.h
llvm/trunk/lib/Analysis/LoopInfo.cpp
llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
llvm/trunk/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Thu Sep 21 18:47:41 2017
@@ -751,7 +751,7 @@ public:
/// the loop forest and parent loops for each block so that \c L is no longer
/// referenced, but does not actually delete \c L immediately. The pointer
/// will remain valid until this LoopInfo's memory is released.
- void markAsErased(Loop *L);
+ void erase(Loop *L);
/// Returns true if replacing From with To everywhere is guaranteed to
/// preserve LCSSA form.
Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopInfo.cpp Thu Sep 21 18:47:41 2017
@@ -618,7 +618,7 @@ bool LoopInfo::invalidate(Function &F, c
PAC.preservedSet<CFGAnalyses>());
}
-void LoopInfo::markAsErased(Loop *Unloop) {
+void LoopInfo::erase(Loop *Unloop) {
assert(!Unloop->isInvalid() && "Loop has already been erased!");
RemovedLoops.push_back(Unloop);
Modified: llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp Thu Sep 21 18:47:41 2017
@@ -143,7 +143,7 @@ bool LoopExtractor::runOnLoop(Loop *L, L
Changed = true;
// After extraction, the loop is replaced by a function call, so
// we shouldn't try to run any more loop passes on it.
- LI.markAsErased(L);
+ LI.erase(L);
}
++NumExtracted;
}
Modified: llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopDeletion.cpp Thu Sep 21 18:47:41 2017
@@ -334,7 +334,7 @@ static void deleteDeadLoop(Loop *L, Domi
LI.removeBlock(BB);
// The last step is to update LoopInfo now that we've eliminated this loop.
- LI.markAsErased(L);
+ LI.erase(L);
}
PreservedAnalyses LoopDeletionPass::run(Loop &L, LoopAnalysisManager &AM,
Modified: llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LoopUnroll.cpp Thu Sep 21 18:47:41 2017
@@ -813,7 +813,7 @@ LoopUnrollStatus llvm::UnrollLoop(
Loop *OuterL = L->getParentLoop();
// Update LoopInfo if the loop is completely removed.
if (CompletelyUnroll)
- LI->markAsErased(L);
+ LI->erase(L);
// After complete unrolling most of the blocks should be contained in OuterL.
// However, some of them might happen to be out of OuterL (e.g. if they
@@ -838,7 +838,7 @@ LoopUnrollStatus llvm::UnrollLoop(
if (NeedToFixLCSSA) {
// LCSSA must be performed on the outermost affected loop. The unrolled
// loop's last loop latch is guaranteed to be in the outermost loop
- // after LoopInfo's been updated by markAsErased.
+ // after LoopInfo's been updated by LoopInfo::erase.
Loop *LatchLoop = LI->getLoopFor(Latches.back());
Loop *FixLCSSALoop = OuterL;
if (!FixLCSSALoop->contains(LatchLoop))
Modified: llvm/trunk/unittests/Transforms/Scalar/LoopPassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Transforms/Scalar/LoopPassManagerTest.cpp?rev=313951&r1=313950&r2=313951&view=diff
==============================================================================
--- llvm/trunk/unittests/Transforms/Scalar/LoopPassManagerTest.cpp (original)
+++ llvm/trunk/unittests/Transforms/Scalar/LoopPassManagerTest.cpp Thu Sep 21 18:47:41 2017
@@ -1393,7 +1393,7 @@ TEST_F(LoopPassManagerTest, LoopDeletion
for (BasicBlock *LoopBB : LoopBBs)
LoopBB->eraseFromParent();
- AR.LI.markAsErased(&L);
+ AR.LI.erase(&L);
};
// Build up the pass managers.
More information about the llvm-commits
mailing list