mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
[llvm] Use pop_back_val (NFC)
This commit is contained in:
parent
f3e18e1dd6
commit
dcbeaf027c
@ -913,8 +913,7 @@ struct AllocaUseVisitor : PtrUseVisitor<AllocaUseVisitor> {
|
||||
// StoreAliases contains aliases of the memory location stored into.
|
||||
SmallVector<Instruction *, 4> StoreAliases = {AI};
|
||||
while (!StoreAliases.empty()) {
|
||||
Instruction *I = StoreAliases.back();
|
||||
StoreAliases.pop_back();
|
||||
Instruction *I = StoreAliases.pop_back_val();
|
||||
for (User *U : I->users()) {
|
||||
// If we are loading from the memory location, we are creating an
|
||||
// alias of the original pointer.
|
||||
@ -2005,8 +2004,7 @@ static void sinkSpillUsesAfterCoroBegin(Function &F,
|
||||
}
|
||||
// Recursively collect users before coro.begin.
|
||||
while (!Worklist.empty()) {
|
||||
auto *Def = Worklist.back();
|
||||
Worklist.pop_back();
|
||||
auto *Def = Worklist.pop_back_val();
|
||||
for (User *U : Def->users()) {
|
||||
auto Inst = cast<Instruction>(U);
|
||||
if (Dom.dominates(CoroBegin, Inst))
|
||||
|
@ -824,8 +824,7 @@ static bool canPaddingBeAccessed(Argument *arg) {
|
||||
// sanely.
|
||||
SmallVector<Value *, 16> WorkList(arg->users());
|
||||
while (!WorkList.empty()) {
|
||||
Value *V = WorkList.back();
|
||||
WorkList.pop_back();
|
||||
Value *V = WorkList.pop_back_val();
|
||||
if (isa<GetElementPtrInst>(V) || isa<PHINode>(V)) {
|
||||
if (PtrValues.insert(V).second)
|
||||
llvm::append_range(WorkList, V->users());
|
||||
|
@ -507,8 +507,7 @@ void Formula::canonicalize(const Loop &L) {
|
||||
|
||||
// Keep the invariant sum in BaseRegs and one of the variant sum in ScaledReg.
|
||||
if (!ScaledReg) {
|
||||
ScaledReg = BaseRegs.back();
|
||||
BaseRegs.pop_back();
|
||||
ScaledReg = BaseRegs.pop_back_val();
|
||||
Scale = 1;
|
||||
}
|
||||
|
||||
|
@ -531,8 +531,7 @@ public:
|
||||
// list.
|
||||
LLVM_DEBUG(dbgs() << "Forward-propagate shapes:\n");
|
||||
while (!WorkList.empty()) {
|
||||
Instruction *Inst = WorkList.back();
|
||||
WorkList.pop_back();
|
||||
Instruction *Inst = WorkList.pop_back_val();
|
||||
|
||||
// New entry, set the value and insert operands
|
||||
bool Propagate = false;
|
||||
@ -602,8 +601,7 @@ public:
|
||||
// worklist.
|
||||
LLVM_DEBUG(dbgs() << "Backward-propagate shapes:\n");
|
||||
while (!WorkList.empty()) {
|
||||
Value *V = WorkList.back();
|
||||
WorkList.pop_back();
|
||||
Value *V = WorkList.pop_back_val();
|
||||
|
||||
size_t BeforeProcessingV = WorkList.size();
|
||||
if (!isa<Instruction>(V))
|
||||
|
@ -2876,8 +2876,7 @@ void NewGVN::cleanupTables() {
|
||||
}
|
||||
|
||||
while (!TempInst.empty()) {
|
||||
auto *I = TempInst.back();
|
||||
TempInst.pop_back();
|
||||
auto *I = TempInst.pop_back_val();
|
||||
I->deleteValue();
|
||||
}
|
||||
|
||||
|
@ -1128,8 +1128,7 @@ static Value *EmitAddTreeOfValues(Instruction *I,
|
||||
SmallVectorImpl<WeakTrackingVH> &Ops) {
|
||||
if (Ops.size() == 1) return Ops.back();
|
||||
|
||||
Value *V1 = Ops.back();
|
||||
Ops.pop_back();
|
||||
Value *V1 = Ops.pop_back_val();
|
||||
Value *V2 = EmitAddTreeOfValues(I, Ops);
|
||||
return CreateAdd(V2, V1, "reass.add", I, I);
|
||||
}
|
||||
|
@ -1448,8 +1448,7 @@ void SCCPSolver::Solve() {
|
||||
|
||||
// Process the basic block work list.
|
||||
while (!BBWorkList.empty()) {
|
||||
BasicBlock *BB = BBWorkList.back();
|
||||
BBWorkList.pop_back();
|
||||
BasicBlock *BB = BBWorkList.pop_back_val();
|
||||
|
||||
LLVM_DEBUG(dbgs() << "\nPopped off BBWL: " << *BB << '\n');
|
||||
|
||||
|
@ -320,8 +320,7 @@ static bool FixIrreducibleImpl(Function &F, LoopInfo &LI, DominatorTree &DT) {
|
||||
append_range(WorkList, LI);
|
||||
|
||||
while (!WorkList.empty()) {
|
||||
auto L = WorkList.back();
|
||||
WorkList.pop_back();
|
||||
auto L = WorkList.pop_back_val();
|
||||
LLVM_DEBUG(dbgs() << "visiting loop with header "
|
||||
<< L->getHeader()->getName() << "\n");
|
||||
Changed |= makeReducible(LI, DT, *L);
|
||||
|
@ -148,8 +148,7 @@ static bool processHeaderPhiOperands(BasicBlock *Header, BasicBlock *Latch,
|
||||
}
|
||||
|
||||
while (!Worklist.empty()) {
|
||||
Instruction *I = Worklist.back();
|
||||
Worklist.pop_back();
|
||||
Instruction *I = Worklist.pop_back_val();
|
||||
if (!Visit(I))
|
||||
return false;
|
||||
|
||||
|
@ -5164,8 +5164,7 @@ BoUpSLP::BlockScheduling::tryScheduleBundle(ArrayRef<Value *> VL, BoUpSLP *SLP,
|
||||
// cancelScheduling).
|
||||
while (!Bundle->isReady() && !ReadyInsts.empty()) {
|
||||
|
||||
ScheduleData *pickedSD = ReadyInsts.back();
|
||||
ReadyInsts.pop_back();
|
||||
ScheduleData *pickedSD = ReadyInsts.pop_back_val();
|
||||
|
||||
if (pickedSD->isSchedulingEntity() && pickedSD->isReady()) {
|
||||
schedule(pickedSD, ReadyInsts);
|
||||
@ -5338,8 +5337,7 @@ void BoUpSLP::BlockScheduling::calculateDependencies(ScheduleData *SD,
|
||||
WorkList.push_back(SD);
|
||||
|
||||
while (!WorkList.empty()) {
|
||||
ScheduleData *SD = WorkList.back();
|
||||
WorkList.pop_back();
|
||||
ScheduleData *SD = WorkList.pop_back_val();
|
||||
|
||||
ScheduleData *BundleMember = SD;
|
||||
while (BundleMember) {
|
||||
|
Loading…
Reference in New Issue
Block a user