Skip to content

Commit e624957

Browse files
committed
DI: Rename testControlVariable() to testControlVariableBit()
1 parent c708785 commit e624957

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

lib/SILOptimizer/Mandatory/DefiniteInitialization.cpp

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,12 +2186,12 @@ static void updateControlVariable(SILLocation Loc,
21862186
}
21872187

21882188
/// Test a bit in the control variable at the current insertion point.
2189-
static SILValue testControlVariable(SILLocation Loc,
2190-
unsigned Elt,
2191-
SILValue ControlVariableAddr,
2192-
Identifier &ShiftRightFn,
2193-
Identifier &TruncateFn,
2194-
SILBuilder &B) {
2189+
static SILValue testControlVariableBit(SILLocation Loc,
2190+
unsigned Elt,
2191+
SILValue ControlVariableAddr,
2192+
Identifier &ShiftRightFn,
2193+
Identifier &TruncateFn,
2194+
SILBuilder &B) {
21952195
SILValue ControlVariable =
21962196
B.createLoad(Loc, ControlVariableAddr, LoadOwnershipQualifier::Trivial);
21972197

@@ -2324,9 +2324,9 @@ SILValue LifetimeChecker::handleConditionalInitAssign() {
23242324
// initialization.
23252325
for (unsigned Elt = Use.FirstElement, e = Elt+Use.NumElements;
23262326
Elt != e; ++Elt) {
2327-
auto CondVal = testControlVariable(Loc, Elt, ControlVariableAddr,
2328-
ShiftRightFn, TruncateFn,
2329-
B);
2327+
auto CondVal = testControlVariableBit(Loc, Elt, ControlVariableAddr,
2328+
ShiftRightFn, TruncateFn,
2329+
B);
23302330

23312331
SILBasicBlock *TrueBB, *FalseBB, *ContBB;
23322332
InsertCFGDiamond(CondVal, Loc, B,
@@ -2465,9 +2465,9 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
24652465

24662466
// Insert a load of the liveness bitmask and split the CFG into a diamond
24672467
// right before the destroy_addr, if we haven't already loaded it.
2468-
auto CondVal = testControlVariable(Loc, Elt, ControlVariableAddr,
2469-
ShiftRightFn, TruncateFn,
2470-
B);
2468+
auto CondVal = testControlVariableBit(Loc, Elt, ControlVariableAddr,
2469+
ShiftRightFn, TruncateFn,
2470+
B);
24712471

24722472
SILBasicBlock *ReleaseBlock, *DeallocBlock, *ContBlock;
24732473

@@ -2486,11 +2486,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
24862486
// depending on if the self box was initialized or not.
24872487
auto emitReleaseOfSelfWhenNotConsumed = [&](SILLocation Loc,
24882488
SILInstruction *Release) {
2489-
auto CondVal = testControlVariable(Loc, SelfInitializedElt,
2490-
ControlVariableAddr,
2491-
ShiftRightFn,
2492-
TruncateFn,
2493-
B);
2489+
auto CondVal = testControlVariableBit(Loc, SelfInitializedElt,
2490+
ControlVariableAddr,
2491+
ShiftRightFn,
2492+
TruncateFn,
2493+
B);
24942494

24952495
SILBasicBlock *ReleaseBlock, *ConsumedBlock, *ContBlock;
24962496

@@ -2573,11 +2573,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
25732573
// self.init or super.init may or may not have been called.
25742574
// We have not yet stored 'self' into the box.
25752575

2576-
auto CondVal = testControlVariable(Loc, SuperInitElt,
2577-
ControlVariableAddr,
2578-
ShiftRightFn,
2579-
TruncateFn,
2580-
B);
2576+
auto CondVal = testControlVariableBit(Loc, SuperInitElt,
2577+
ControlVariableAddr,
2578+
ShiftRightFn,
2579+
TruncateFn,
2580+
B);
25812581

25822582
SILBasicBlock *ConsumedBlock, *DeallocBlock, *ContBlock;
25832583

@@ -2607,11 +2607,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
26072607
// self.init or super.init may or may not have been called.
26082608
// We may or may have stored 'self' into the box.
26092609

2610-
auto CondVal = testControlVariable(Loc, SuperInitElt,
2611-
ControlVariableAddr,
2612-
ShiftRightFn,
2613-
TruncateFn,
2614-
B);
2610+
auto CondVal = testControlVariableBit(Loc, SuperInitElt,
2611+
ControlVariableAddr,
2612+
ShiftRightFn,
2613+
TruncateFn,
2614+
B);
26152615

26162616
SILBasicBlock *LiveBlock, *DeallocBlock, *ContBlock;
26172617

0 commit comments

Comments
 (0)