Skip to content

Commit 6ee8d0d

Browse files
committed
[Gardening] Recapitalized type.
1 parent b757968 commit 6ee8d0d

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

lib/SILOptimizer/Utils/ShrinkBorrowScope.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -139,17 +139,17 @@ struct DeinitBarriers final {
139139
/// place they can be hoisted to.
140140
///
141141
/// Implements BackwardReachability::BlockReachability.
142-
class DataFlow final {
142+
class Dataflow final {
143143
Context const &context;
144144
Usage const &uses;
145145
DeinitBarriers &result;
146146

147147
enum class Classification { Barrier, Copy, Other };
148148

149-
BackwardReachability<DataFlow> reachability;
149+
BackwardReachability<Dataflow> reachability;
150150

151151
public:
152-
DataFlow(Context const &context, Usage const &uses, DeinitBarriers &result)
152+
Dataflow(Context const &context, Usage const &uses, DeinitBarriers &result)
153153
: context(context), uses(uses), result(result),
154154
reachability(&context.function, *this) {
155155
// Seed reachability with the scope ending uses from which the backwards
@@ -158,13 +158,13 @@ class DataFlow final {
158158
reachability.initLastUse(end);
159159
}
160160
}
161-
DataFlow(DataFlow const &) = delete;
162-
DataFlow &operator=(DataFlow const &) = delete;
161+
Dataflow(Dataflow const &) = delete;
162+
Dataflow &operator=(Dataflow const &) = delete;
163163

164164
void run() { reachability.solveBackward(); }
165165

166166
private:
167-
friend class BackwardReachability<DataFlow>;
167+
friend class BackwardReachability<Dataflow>;
168168

169169
bool hasReachableBegin(SILBasicBlock *block) {
170170
return result.hoistingReachesBeginBlocks.contains(block);
@@ -207,8 +207,8 @@ bool isSimpleExtendedIntroducerDef(Context const &context, SILValue value) {
207207
}
208208
}
209209

210-
DataFlow::Classification
211-
DataFlow::classifyInstruction(SILInstruction *instruction) {
210+
Dataflow::Classification
211+
Dataflow::classifyInstruction(SILInstruction *instruction) {
212212
if (instruction == &context.introducer) {
213213
return Classification::Barrier;
214214
}
@@ -226,7 +226,7 @@ DataFlow::classifyInstruction(SILInstruction *instruction) {
226226
return Classification::Other;
227227
}
228228

229-
bool DataFlow::classificationIsBarrier(Classification classification) {
229+
bool Dataflow::classificationIsBarrier(Classification classification) {
230230
switch (classification) {
231231
case Classification::Barrier:
232232
return true;
@@ -237,7 +237,7 @@ bool DataFlow::classificationIsBarrier(Classification classification) {
237237
llvm_unreachable("exhaustive switch not exhaustive?!");
238238
}
239239

240-
void DataFlow::visitedInstruction(SILInstruction *instruction,
240+
void Dataflow::visitedInstruction(SILInstruction *instruction,
241241
Classification classification) {
242242
assert(classifyInstruction(instruction) == classification);
243243
switch (classification) {
@@ -253,13 +253,13 @@ void DataFlow::visitedInstruction(SILInstruction *instruction,
253253
llvm_unreachable("exhaustive switch not exhaustive?!");
254254
}
255255

256-
bool DataFlow::checkReachableBarrier(SILInstruction *instruction) {
256+
bool Dataflow::checkReachableBarrier(SILInstruction *instruction) {
257257
auto classification = classifyInstruction(instruction);
258258
visitedInstruction(instruction, classification);
259259
return classificationIsBarrier(classification);
260260
}
261261

262-
bool DataFlow::checkReachablePhiBarrier(SILBasicBlock *block) {
262+
bool Dataflow::checkReachablePhiBarrier(SILBasicBlock *block) {
263263
assert(llvm::all_of(block->getArguments(),
264264
[&](auto argument) { return PhiValue(argument); }));
265265

@@ -397,7 +397,7 @@ bool run(Context &context) {
397397
return false;
398398

399399
DeinitBarriers barriers(context);
400-
DataFlow flow(context, usage, barriers);
400+
Dataflow flow(context, usage, barriers);
401401
flow.run();
402402

403403
Rewriter rewriter(context, usage, barriers);

0 commit comments

Comments
 (0)