Skip to content

Commit 67e0b43

Browse files
committed
[move-function-addr] Use DebugVarCarryingInst::-> to transform debug.inst->callMethod() to debug->callMethod().
DebugVarCarryingInst provides this light weight API... lets use it to shrink our code! NFC.
1 parent 4a5d7ae commit 67e0b43

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/SILOptimizer/Mandatory/MoveKillsCopyableAddressesChecker.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,9 +1951,9 @@ static bool performSingleBasicBlockAnalysis(
19511951
if (auto varInfo = debug.getVarInfo()) {
19521952
SILBuilderWithScope undefBuilder(builder);
19531953
debugInfoBlockSplitPoints.insert(*debug);
1954-
undefBuilder.setCurrentDebugScope(debug.inst->getDebugScope());
1954+
undefBuilder.setCurrentDebugScope(debug->getDebugScope());
19551955
undefBuilder.createDebugValue(
1956-
debug.inst->getLoc(),
1956+
debug->getLoc(),
19571957
SILUndef::get(address->getType(), builder.getModule()), *varInfo,
19581958
false,
19591959
/*was moved*/ true);
@@ -2063,9 +2063,9 @@ static bool performSingleBasicBlockAnalysis(
20632063
{
20642064
debugInfoBlockSplitPoints.insert(*debug);
20652065
SILBuilderWithScope undefBuilder(builder);
2066-
undefBuilder.setCurrentDebugScope(debug.inst->getDebugScope());
2066+
undefBuilder.setCurrentDebugScope(debug->getDebugScope());
20672067
undefBuilder.createDebugValue(
2068-
debug.inst->getLoc(),
2068+
debug->getLoc(),
20692069
SILUndef::get(address->getType(), builder.getModule()), *varInfo,
20702070
false,
20712071
/*was moved*/ true);
@@ -2076,7 +2076,7 @@ static bool performSingleBasicBlockAnalysis(
20762076
auto *next = interestingUser->getNextInstruction();
20772077
SILBuilderWithScope reinitBuilder(next);
20782078
reinitBuilder.setCurrentDebugScope(debug->getDebugScope());
2079-
auto *dvi = reinitBuilder.createDebugValue(debug.inst->getLoc(),
2079+
auto *dvi = reinitBuilder.createDebugValue(debug->getLoc(),
20802080
address, *varInfo, false,
20812081
/*was moved*/ true);
20822082
debugInfoBlockSplitPoints.insert(dvi);
@@ -2117,9 +2117,9 @@ static bool performSingleBasicBlockAnalysis(
21172117
if (auto varInfo = debug.getVarInfo()) {
21182118
debugInfoBlockSplitPoints.insert(*debug);
21192119
SILBuilderWithScope undefBuilder(builder);
2120-
undefBuilder.setCurrentDebugScope(debug.inst->getDebugScope());
2120+
undefBuilder.setCurrentDebugScope(debug->getDebugScope());
21212121
undefBuilder.createDebugValue(
2122-
debug.inst->getLoc(),
2122+
debug->getLoc(),
21232123
SILUndef::get(address->getType(), builder.getModule()), *varInfo,
21242124
false,
21252125
/*was moved*/ true);

0 commit comments

Comments
 (0)