@@ -139,17 +139,17 @@ struct DeinitBarriers final {
139
139
// / place they can be hoisted to.
140
140
// /
141
141
// / Implements BackwardReachability::BlockReachability.
142
- class DataFlow final {
142
+ class Dataflow final {
143
143
Context const &context;
144
144
Usage const &uses;
145
145
DeinitBarriers &result;
146
146
147
147
enum class Classification { Barrier, Copy, Other };
148
148
149
- BackwardReachability<DataFlow > reachability;
149
+ BackwardReachability<Dataflow > reachability;
150
150
151
151
public:
152
- DataFlow (Context const &context, Usage const &uses, DeinitBarriers &result)
152
+ Dataflow (Context const &context, Usage const &uses, DeinitBarriers &result)
153
153
: context(context), uses(uses), result(result),
154
154
reachability (&context.function, *this ) {
155
155
// Seed reachability with the scope ending uses from which the backwards
@@ -158,13 +158,13 @@ class DataFlow final {
158
158
reachability.initLastUse (end);
159
159
}
160
160
}
161
- DataFlow (DataFlow const &) = delete;
162
- DataFlow &operator =(DataFlow const &) = delete ;
161
+ Dataflow (Dataflow const &) = delete;
162
+ Dataflow &operator =(Dataflow const &) = delete ;
163
163
164
164
void run () { reachability.solveBackward (); }
165
165
166
166
private:
167
- friend class BackwardReachability <DataFlow >;
167
+ friend class BackwardReachability <Dataflow >;
168
168
169
169
bool hasReachableBegin (SILBasicBlock *block) {
170
170
return result.hoistingReachesBeginBlocks .contains (block);
@@ -207,8 +207,8 @@ bool isSimpleExtendedIntroducerDef(Context const &context, SILValue value) {
207
207
}
208
208
}
209
209
210
- DataFlow ::Classification
211
- DataFlow ::classifyInstruction (SILInstruction *instruction) {
210
+ Dataflow ::Classification
211
+ Dataflow ::classifyInstruction (SILInstruction *instruction) {
212
212
if (instruction == &context.introducer ) {
213
213
return Classification::Barrier;
214
214
}
@@ -226,7 +226,7 @@ DataFlow::classifyInstruction(SILInstruction *instruction) {
226
226
return Classification::Other;
227
227
}
228
228
229
- bool DataFlow ::classificationIsBarrier (Classification classification) {
229
+ bool Dataflow ::classificationIsBarrier (Classification classification) {
230
230
switch (classification) {
231
231
case Classification::Barrier:
232
232
return true ;
@@ -237,7 +237,7 @@ bool DataFlow::classificationIsBarrier(Classification classification) {
237
237
llvm_unreachable (" exhaustive switch not exhaustive?!" );
238
238
}
239
239
240
- void DataFlow ::visitedInstruction (SILInstruction *instruction,
240
+ void Dataflow ::visitedInstruction (SILInstruction *instruction,
241
241
Classification classification) {
242
242
assert (classifyInstruction (instruction) == classification);
243
243
switch (classification) {
@@ -253,13 +253,13 @@ void DataFlow::visitedInstruction(SILInstruction *instruction,
253
253
llvm_unreachable (" exhaustive switch not exhaustive?!" );
254
254
}
255
255
256
- bool DataFlow ::checkReachableBarrier (SILInstruction *instruction) {
256
+ bool Dataflow ::checkReachableBarrier (SILInstruction *instruction) {
257
257
auto classification = classifyInstruction (instruction);
258
258
visitedInstruction (instruction, classification);
259
259
return classificationIsBarrier (classification);
260
260
}
261
261
262
- bool DataFlow ::checkReachablePhiBarrier (SILBasicBlock *block) {
262
+ bool Dataflow ::checkReachablePhiBarrier (SILBasicBlock *block) {
263
263
assert (llvm::all_of (block->getArguments (),
264
264
[&](auto argument) { return PhiValue (argument); }));
265
265
@@ -397,7 +397,7 @@ bool run(Context &context) {
397
397
return false ;
398
398
399
399
DeinitBarriers barriers (context);
400
- DataFlow flow (context, usage, barriers);
400
+ Dataflow flow (context, usage, barriers);
401
401
flow.run ();
402
402
403
403
Rewriter rewriter (context, usage, barriers);
0 commit comments