[llvm] 34547ac - NFC. Comments cleanup in DSE::memoryIsNotModifiedBetween
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 15:22:50 PST 2020
Author: Artur Pilipenko
Date: 2020-01-31T15:22:33-08:00
New Revision: 34547ac9594d872fbd6235192c98f180962d15bb
URL: https://github.com/llvm/llvm-project/commit/34547ac9594d872fbd6235192c98f180962d15bb
DIFF: https://github.com/llvm/llvm-project/commit/34547ac9594d872fbd6235192c98f180962d15bb.diff
LOG: NFC. Comments cleanup in DSE::memoryIsNotModifiedBetween
Separated from https://reviews.llvm.org/D68006 review.
Added:
Modified:
llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
index 1ba4aab999e1..2dd429612dac 100644
--- a/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
@@ -607,26 +607,26 @@ static bool memoryIsNotModifiedBetween(Instruction *FirstI,
BasicBlock *SecondBB = SecondI->getParent();
MemoryLocation MemLoc = MemoryLocation::get(SecondI);
- // Start checking the store-block.
+ // Start checking the SecondBB.
WorkList.push_back(SecondBB);
bool isFirstBlock = true;
- // Check all blocks going backward until we reach the load-block.
+ // Check all blocks going backward until we reach the FirstBB.
while (!WorkList.empty()) {
BasicBlock *B = WorkList.pop_back_val();
- // Ignore instructions before LI if this is the FirstBB.
+ // Ignore instructions before FirstI if this is the FirstBB.
BasicBlock::iterator BI = (B == FirstBB ? FirstBBI : B->begin());
BasicBlock::iterator EI;
if (isFirstBlock) {
- // Ignore instructions after SI if this is the first visit of SecondBB.
+ // Ignore instructions after SecondI if this is the first visit of SecondBB.
assert(B == SecondBB && "first block is not the store block");
EI = SecondBBI;
isFirstBlock = false;
} else {
// It's not SecondBB or (in case of a loop) the second visit of SecondBB.
- // In this case we also have to look at instructions after SI.
+ // In this case we also have to look at instructions after SecondI.
EI = B->end();
}
for (; BI != EI; ++BI) {
More information about the llvm-commits
mailing list