Skip to content

Commit 99ac764

Browse files
Address review comments.
1 parent 93e0e47 commit 99ac764

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

llvm/include/llvm/Transforms/Utils/SSAUpdater.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,6 @@ class LoadAndStorePromoter {
164164
/// removed from the code.
165165
void run(const SmallVectorImpl<Instruction *> &Insts);
166166

167-
/// Return true if the specified instruction is in the Inst list.
168-
///
169-
/// The Insts list is the one passed into the constructor. Clients should
170-
/// implement this with a more efficient version if possible.
171-
virtual bool isInstInList(Instruction *I,
172-
const SmallVectorImpl<Instruction *> &Insts) const;
173-
174167
/// This hook is invoked after all the stores are found and inserted as
175168
/// available values.
176169
virtual void doExtraRewritesBeforeFinalDeletion() {}

llvm/lib/Transforms/Utils/SSAUpdater.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -442,8 +442,9 @@ void LoadAndStorePromoter::run(const SmallVectorImpl<Instruction *> &Insts) {
442442

443443
// Sort all of the interesting instructions in the block so that we don't
444444
// have to scan a large block just to find a few instructions.
445-
std::sort(BlockUses.begin(), BlockUses.end(),
446-
[](Instruction *A, Instruction *B) { return A->comesBefore(B); });
445+
llvm::sort(
446+
BlockUses.begin(), BlockUses.end(),
447+
[](Instruction *A, Instruction *B) { return A->comesBefore(B); });
447448

448449
// Otherwise, we have mixed loads and stores (or just a bunch of stores).
449450
// Since SSAUpdater is purely for cross-block values, we need to determine
@@ -529,10 +530,3 @@ void LoadAndStorePromoter::run(const SmallVectorImpl<Instruction *> &Insts) {
529530
User->eraseFromParent();
530531
}
531532
}
532-
533-
bool
534-
LoadAndStorePromoter::isInstInList(Instruction *I,
535-
const SmallVectorImpl<Instruction *> &Insts)
536-
const {
537-
return is_contained(Insts, I);
538-
}

0 commit comments

Comments
 (0)