[llvm] 86a5c32 - [PowerPC] iterate on the SmallSet directly; NFC
Chen Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 21 23:20:56 PDT 2021
Author: Chen Zheng
Date: 2021-10-22T06:18:07Z
New Revision: 86a5c32616439a9af5d447e54b70f1a3c2e60c6a
URL: https://github.com/llvm/llvm-project/commit/86a5c32616439a9af5d447e54b70f1a3c2e60c6a
DIFF: https://github.com/llvm/llvm-project/commit/86a5c32616439a9af5d447e54b70f1a3c2e60c6a.diff
LOG: [PowerPC] iterate on the SmallSet directly; NFC
Added:
Modified:
llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
index 39afe58da9687..fa4865ceb384a 100644
--- a/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
+++ b/llvm/lib/Target/PowerPC/PPCLoopInstrFormPrep.cpp
@@ -789,9 +789,8 @@ bool PPCLoopInstrFormPrep::updateFormPrep(Loop *L,
MadeChange |= rewriteLoadStores(L, Bucket, BBChanged, UpdateForm);
if (MadeChange)
- for (auto &BB : L->blocks())
- if (BBChanged.count(BB))
- DeleteDeadPHIs(BB);
+ for (auto *BB : BBChanged)
+ DeleteDeadPHIs(BB);
return MadeChange;
}
@@ -811,9 +810,8 @@ bool PPCLoopInstrFormPrep::dispFormPrep(Loop *L, SmallVector<Bucket, 16> &Bucket
}
if (MadeChange)
- for (auto &BB : L->blocks())
- if (BBChanged.count(BB))
- DeleteDeadPHIs(BB);
+ for (auto *BB : BBChanged)
+ DeleteDeadPHIs(BB);
return MadeChange;
}
More information about the llvm-commits
mailing list