Skip to content

Commit caed4e8

Browse files
committed
DI: Rename testControlVariable() to testControlVariableBit()
1 parent 3c81a68 commit caed4e8

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
@@ -2177,12 +2177,12 @@ static void updateControlVariable(SILLocation Loc,
21772177
}
21782178

21792179
/// Test a bit in the control variable at the current insertion point.
2180-
static SILValue testControlVariable(SILLocation Loc,
2181-
unsigned Elt,
2182-
SILValue ControlVariableAddr,
2183-
Identifier &ShiftRightFn,
2184-
Identifier &TruncateFn,
2185-
SILBuilder &B) {
2180+
static SILValue testControlVariableBit(SILLocation Loc,
2181+
unsigned Elt,
2182+
SILValue ControlVariableAddr,
2183+
Identifier &ShiftRightFn,
2184+
Identifier &TruncateFn,
2185+
SILBuilder &B) {
21862186
SILValue ControlVariable =
21872187
B.createLoad(Loc, ControlVariableAddr, LoadOwnershipQualifier::Trivial);
21882188

@@ -2315,9 +2315,9 @@ SILValue LifetimeChecker::handleConditionalInitAssign() {
23152315
// initialization.
23162316
for (unsigned Elt = Use.FirstElement, e = Elt+Use.NumElements;
23172317
Elt != e; ++Elt) {
2318-
auto CondVal = testControlVariable(Loc, Elt, ControlVariableAddr,
2319-
ShiftRightFn, TruncateFn,
2320-
B);
2318+
auto CondVal = testControlVariableBit(Loc, Elt, ControlVariableAddr,
2319+
ShiftRightFn, TruncateFn,
2320+
B);
23212321

23222322
SILBasicBlock *TrueBB, *FalseBB, *ContBB;
23232323
InsertCFGDiamond(CondVal, Loc, B,
@@ -2456,9 +2456,9 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
24562456

24572457
// Insert a load of the liveness bitmask and split the CFG into a diamond
24582458
// right before the destroy_addr, if we haven't already loaded it.
2459-
auto CondVal = testControlVariable(Loc, Elt, ControlVariableAddr,
2460-
ShiftRightFn, TruncateFn,
2461-
B);
2459+
auto CondVal = testControlVariableBit(Loc, Elt, ControlVariableAddr,
2460+
ShiftRightFn, TruncateFn,
2461+
B);
24622462

24632463
SILBasicBlock *ReleaseBlock, *DeallocBlock, *ContBlock;
24642464

@@ -2477,11 +2477,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
24772477
// depending on if the self box was initialized or not.
24782478
auto emitReleaseOfSelfWhenNotConsumed = [&](SILLocation Loc,
24792479
SILInstruction *Release) {
2480-
auto CondVal = testControlVariable(Loc, SelfInitializedElt,
2481-
ControlVariableAddr,
2482-
ShiftRightFn,
2483-
TruncateFn,
2484-
B);
2480+
auto CondVal = testControlVariableBit(Loc, SelfInitializedElt,
2481+
ControlVariableAddr,
2482+
ShiftRightFn,
2483+
TruncateFn,
2484+
B);
24852485

24862486
SILBasicBlock *ReleaseBlock, *ConsumedBlock, *ContBlock;
24872487

@@ -2564,11 +2564,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
25642564
// self.init or super.init may or may not have been called.
25652565
// We have not yet stored 'self' into the box.
25662566

2567-
auto CondVal = testControlVariable(Loc, SuperInitElt,
2568-
ControlVariableAddr,
2569-
ShiftRightFn,
2570-
TruncateFn,
2571-
B);
2567+
auto CondVal = testControlVariableBit(Loc, SuperInitElt,
2568+
ControlVariableAddr,
2569+
ShiftRightFn,
2570+
TruncateFn,
2571+
B);
25722572

25732573
SILBasicBlock *ConsumedBlock, *DeallocBlock, *ContBlock;
25742574

@@ -2598,11 +2598,11 @@ handleConditionalDestroys(SILValue ControlVariableAddr) {
25982598
// self.init or super.init may or may not have been called.
25992599
// We may or may have stored 'self' into the box.
26002600

2601-
auto CondVal = testControlVariable(Loc, SuperInitElt,
2602-
ControlVariableAddr,
2603-
ShiftRightFn,
2604-
TruncateFn,
2605-
B);
2601+
auto CondVal = testControlVariableBit(Loc, SuperInitElt,
2602+
ControlVariableAddr,
2603+
ShiftRightFn,
2604+
TruncateFn,
2605+
B);
26062606

26072607
SILBasicBlock *LiveBlock, *DeallocBlock, *ContBlock;
26082608

0 commit comments

Comments
 (0)