Skip to content

Commit cecf2f5

Browse files
committed
[pass-manager] Analysis => Analyses.
This is a list of analyses, so using plural form makes more sense.
1 parent c997080 commit cecf2f5

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

include/swift/SILOptimizer/PassManager/PassManager.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class SILPassManager {
4848
llvm::SmallVector<SILTransform *, 16> Transformations;
4949

5050
/// A list of registered analysis.
51-
llvm::SmallVector<SILAnalysis *, 16> Analysis;
51+
llvm::SmallVector<SILAnalysis *, 16> Analyses;
5252

5353
/// An entry in the FunctionWorkList.
5454
struct WorklistEntry {
@@ -122,7 +122,7 @@ class SILPassManager {
122122
/// analysis. If the analysis is not found, the program terminates.
123123
template<typename T>
124124
T *getAnalysis() {
125-
for (SILAnalysis *A : Analysis)
125+
for (SILAnalysis *A : Analyses)
126126
if (auto *R = llvm::dyn_cast<T>(A))
127127
return R;
128128

@@ -145,7 +145,7 @@ class SILPassManager {
145145
/// \brief Iterate over all analysis and invalidate them.
146146
void invalidateAllAnalysis() {
147147
// Invalidate the analysis (unless they are locked)
148-
for (auto AP : Analysis)
148+
for (auto AP : Analyses)
149149
if (!AP->isLocked())
150150
AP->invalidate();
151151

@@ -170,7 +170,7 @@ class SILPassManager {
170170
/// is the job of the analysis to make sure no extra work is done if the
171171
/// particular analysis has been done on the function.
172172
void notifyAnalysisOfFunction(SILFunction *F) {
173-
for (auto AP : Analysis) {
173+
for (auto AP : Analyses) {
174174
AP->notifyAddedOrModifiedFunction(F);
175175
}
176176
}
@@ -179,7 +179,7 @@ class SILPassManager {
179179
void invalidateAnalysis(SILFunction *F,
180180
SILAnalysis::InvalidationKind K) {
181181
// Invalidate the analysis (unless they are locked)
182-
for (auto AP : Analysis)
182+
for (auto AP : Analyses)
183183
if (!AP->isLocked())
184184
AP->invalidate(F, K);
185185

@@ -192,7 +192,7 @@ class SILPassManager {
192192
/// or vtables.
193193
void invalidateFunctionTables() {
194194
// Invalidate the analysis (unless they are locked)
195-
for (auto AP : Analysis)
195+
for (auto AP : Analyses)
196196
if (!AP->isLocked())
197197
AP->invalidateFunctionTables();
198198

@@ -205,7 +205,7 @@ class SILPassManager {
205205
/// \brief Iterate over all analysis and notify them of a deleted function.
206206
void notifyDeleteFunction(SILFunction *F) {
207207
// Invalidate the analysis (unless they are locked)
208-
for (auto AP : Analysis)
208+
for (auto AP : Analyses)
209209
if (!AP->isLocked())
210210
AP->notifyWillDeleteFunction(F);
211211

@@ -233,7 +233,7 @@ class SILPassManager {
233233

234234
/// Verify all analyses.
235235
void verifyAnalyses() const {
236-
for (auto *A : Analysis) {
236+
for (auto *A : Analyses) {
237237
A->verify();
238238
}
239239
}
@@ -245,7 +245,7 @@ class SILPassManager {
245245
/// this. If no override is provided the SILAnalysis should just call the
246246
/// normal verify method.
247247
void verifyAnalyses(SILFunction *F) const {
248-
for (auto *A : Analysis) {
248+
for (auto *A : Analyses) {
249249
A->verify(F);
250250
}
251251
}

lib/SILOptimizer/PassManager/PassManager.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ SILPassManager::SILPassManager(SILModule *M, llvm::StringRef Stage,
236236
Mod(M), StageName(Stage), isMandatoryPipeline(isMandatoryPipeline) {
237237

238238
#define ANALYSIS(NAME) \
239-
Analysis.push_back(create##NAME##Analysis(Mod));
239+
Analyses.push_back(create##NAME##Analysis(Mod));
240240
#include "swift/SILOptimizer/Analysis/Analysis.def"
241241

242-
for (SILAnalysis *A : Analysis) {
242+
for (SILAnalysis *A : Analyses) {
243243
A->initialize(this);
244244
M->registerDeleteNotificationHandler(A);
245245
}
@@ -258,7 +258,7 @@ bool SILPassManager::continueTransforming() {
258258
}
259259

260260
bool SILPassManager::analysesUnlocked() {
261-
for (auto *A : Analysis)
261+
for (auto *A : Analyses)
262262
if (A->isLocked())
263263
return false;
264264

@@ -544,7 +544,7 @@ SILPassManager::~SILPassManager() {
544544
delete T;
545545

546546
// delete the analysis.
547-
for (auto *A : Analysis) {
547+
for (auto *A : Analyses) {
548548
Mod->removeDeleteNotificationHandler(A);
549549
assert(!A->isLocked() &&
550550
"Deleting a locked analysis. Did we forget to unlock ?");

0 commit comments

Comments
 (0)