[NFC] OSSACompleteLifetime: Renamed.

This commit is contained in:
Nate Chandler
2025-08-18 08:46:58 -07:00
parent d8710fc83d
commit aa85694237
17 changed files with 178 additions and 181 deletions

View File

@@ -243,7 +243,7 @@
#include "swift/SIL/FieldSensitivePrunedLiveness.h"
#include "swift/SIL/InstructionUtils.h"
#include "swift/SIL/MemAccessUtils.h"
#include "swift/SIL/OSSALifetimeCompletion.h"
#include "swift/SIL/OSSACompleteLifetime.h"
#include "swift/SIL/OwnershipUtils.h"
#include "swift/SIL/PrunedLiveness.h"
#include "swift/SIL/SILArgument.h"
@@ -4071,13 +4071,12 @@ bool MoveOnlyAddressChecker::check(
return pimpl.changed;
}
bool MoveOnlyAddressChecker::completeLifetimes() {
// TODO: Delete once OSSALifetimeCompletion is run as part of SILGenCleanup
// TODO: Delete once OSSACompleteLifetime is run as part of SILGenCleanup
bool changed = false;
// Lifetimes must be completed inside out (bottom-up in the CFG).
PostOrderFunctionInfo *postOrder = poa->get(fn);
OSSALifetimeCompletion completion(fn, domTree,
*deadEndBlocksAnalysis->get(fn));
OSSACompleteLifetime completion(fn, domTree, *deadEndBlocksAnalysis->get(fn));
for (auto *block : postOrder->getPostOrder()) {
for (SILInstruction &inst : reverse(*block)) {
for (auto result : inst.getResults()) {
@@ -4086,7 +4085,7 @@ bool MoveOnlyAddressChecker::completeLifetimes() {
continue;
}
if (completion.completeOSSALifetime(
result, OSSALifetimeCompletion::Boundary::Availability) ==
result, OSSACompleteLifetime::Boundary::Availability) ==
LifetimeCompletion::WasCompleted) {
changed = true;
}
@@ -4097,7 +4096,7 @@ bool MoveOnlyAddressChecker::completeLifetimes() {
continue;
}
if (completion.completeOSSALifetime(
arg, OSSALifetimeCompletion::Boundary::Availability) ==
arg, OSSACompleteLifetime::Boundary::Availability) ==
LifetimeCompletion::WasCompleted) {
changed = true;
}