@@ -119,17 +119,17 @@ struct DeinitBarriers final {
119
119
// / place they can be hoisted to.
120
120
// /
121
121
// / Implements BackwardReachability::BlockReachability.
122
- class DataFlow final {
122
+ class Dataflow final {
123
123
Context const &context;
124
124
Usage const &uses;
125
125
DeinitBarriers &result;
126
126
127
127
enum class Classification { Barrier, Other };
128
128
129
- BackwardReachability<DataFlow > reachability;
129
+ BackwardReachability<Dataflow > reachability;
130
130
131
131
public:
132
- DataFlow (Context const &context, Usage const &uses, DeinitBarriers &result)
132
+ Dataflow (Context const &context, Usage const &uses, DeinitBarriers &result)
133
133
: context(context), uses(uses), result(result),
134
134
reachability (&context.function, *this ) {
135
135
// Seed reachability with the scope ending uses from which the backwards
@@ -138,13 +138,13 @@ class DataFlow final {
138
138
reachability.initLastUse (end);
139
139
}
140
140
}
141
- DataFlow (DataFlow const &) = delete;
142
- DataFlow &operator =(DataFlow const &) = delete ;
141
+ Dataflow (Dataflow const &) = delete;
142
+ Dataflow &operator =(Dataflow const &) = delete ;
143
143
144
144
void run () { reachability.solveBackward (); }
145
145
146
146
private:
147
- friend class BackwardReachability <DataFlow >;
147
+ friend class BackwardReachability <Dataflow >;
148
148
149
149
bool hasReachableBegin (SILBasicBlock *block) {
150
150
return result.hoistingReachesBeginBlocks .contains (block);
@@ -169,8 +169,8 @@ class DataFlow final {
169
169
bool checkReachablePhiBarrier (SILBasicBlock *);
170
170
};
171
171
172
- DataFlow ::Classification
173
- DataFlow ::classifyInstruction (SILInstruction *instruction) {
172
+ Dataflow ::Classification
173
+ Dataflow ::classifyInstruction (SILInstruction *instruction) {
174
174
if (instruction == context.definition ) {
175
175
return Classification::Barrier;
176
176
}
@@ -183,7 +183,7 @@ DataFlow::classifyInstruction(SILInstruction *instruction) {
183
183
return Classification::Other;
184
184
}
185
185
186
- bool DataFlow ::classificationIsBarrier (Classification classification) {
186
+ bool Dataflow ::classificationIsBarrier (Classification classification) {
187
187
switch (classification) {
188
188
case Classification::Barrier:
189
189
return true ;
@@ -193,7 +193,7 @@ bool DataFlow::classificationIsBarrier(Classification classification) {
193
193
llvm_unreachable (" exhaustive switch not exhaustive?!" );
194
194
}
195
195
196
- void DataFlow ::visitedInstruction (SILInstruction *instruction,
196
+ void Dataflow ::visitedInstruction (SILInstruction *instruction,
197
197
Classification classification) {
198
198
assert (classifyInstruction (instruction) == classification);
199
199
switch (classification) {
@@ -206,13 +206,13 @@ void DataFlow::visitedInstruction(SILInstruction *instruction,
206
206
llvm_unreachable (" exhaustive switch not exhaustive?!" );
207
207
}
208
208
209
- bool DataFlow ::checkReachableBarrier (SILInstruction *instruction) {
209
+ bool Dataflow ::checkReachableBarrier (SILInstruction *instruction) {
210
210
auto classification = classifyInstruction (instruction);
211
211
visitedInstruction (instruction, classification);
212
212
return classificationIsBarrier (classification);
213
213
}
214
214
215
- bool DataFlow ::checkReachablePhiBarrier (SILBasicBlock *block) {
215
+ bool Dataflow ::checkReachablePhiBarrier (SILBasicBlock *block) {
216
216
assert (llvm::all_of (block->getArguments (),
217
217
[&](auto argument) { return PhiValue (argument); }));
218
218
@@ -342,7 +342,7 @@ bool run(Context &context) {
342
342
return false ;
343
343
344
344
DeinitBarriers barriers (context);
345
- DataFlow flow (context, usage, barriers);
345
+ Dataflow flow (context, usage, barriers);
346
346
flow.run ();
347
347
348
348
Rewriter rewriter (context, usage, barriers);
0 commit comments