Skip to content

Commit 8f1d661

Browse files
committed
[NFC] OSSACanonicalizeOwned: Renamed.
1 parent aa85694 commit 8f1d661

26 files changed

+201
-203
lines changed

include/swift/SILOptimizer/Utils/CanonicalizeBorrowScope.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/// to only the uses within the scope. To do this, it hoists forwarding
1515
/// operations out of the scope. This exposes many useless scopes that can be
1616
/// deleted, which in turn allows canonicalization of the outer owned values
17-
/// (via CanonicalizeOSSALifetime).
17+
/// (via OSSACanonicalizeOwned).
1818
///
1919
/// This does not shrink borrow scopes; it does not rewrite end_borrows. For
2020
/// that, see ShrinkBorrowScope.

include/swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h renamed to include/swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===- CanonicalizeOSSALifetime.h - Canonicalize OSSA lifetimes -*- C++ -*-===//
1+
//===- OSSACanonicalizeOwned.h - Canonicalize OSSA lifetimes -*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -14,7 +14,7 @@
1414
///
1515
/// This top-level API rewrites the extended OSSA lifetime of a SILValue:
1616
///
17-
/// void canonicalizeValueLifetime(SILValue def, CanonicalizeOSSALifetime &)
17+
/// void canonicalizeValueLifetime(SILValue def, OSSACanonicalizeOwned &)
1818
///
1919
/// The "extended lifetime" of the references defined by 'def' transitively
2020
/// includes the uses of 'def' itself along with the uses of any copies of
@@ -197,7 +197,7 @@ enum MaximizeLifetime_t : bool {
197197
///
198198
/// TODO: Move all the private per-definition members into an implementation
199199
/// class in the .cpp file.
200-
class CanonicalizeOSSALifetime final {
200+
class OSSACanonicalizeOwned final {
201201
public:
202202
/// Find the original definition of a potentially copied value. \p copiedValue
203203
/// must be an owned value. It is usually a copy but may also be a destroy.
@@ -343,14 +343,14 @@ class CanonicalizeOSSALifetime final {
343343
struct LivenessState {
344344
BitfieldRef<SSAPrunedLiveness>::StackState state;
345345

346-
LivenessState(CanonicalizeOSSALifetime &parent, SILValue def,
346+
LivenessState(OSSACanonicalizeOwned &parent, SILValue def,
347347
ArrayRef<SILInstruction *> lexicalLifetimeEnds)
348348
: state(parent.liveness, def->getFunction()) {
349349
parent.initializeLiveness(def, lexicalLifetimeEnds);
350350
}
351351
};
352352

353-
CanonicalizeOSSALifetime(
353+
OSSACanonicalizeOwned(
354354
PruneDebugInsts_t pruneDebugMode, MaximizeLifetime_t maximizeLifetime,
355355
SILFunction *function, NonLocalAccessBlockAnalysis *accessBlockAnalysis,
356356
DeadEndBlocksAnalysis *deadEndBlocksAnalysis, DominanceInfo *domTree,

include/swift/SILOptimizer/Utils/OwnershipOptUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ inline bool requiresOSSACleanup(SILValue v) {
4848
///
4949
/// Precondition: lifetimeBoundary is a superset of ownedValue's current
5050
/// lifetime (therefore, none of the safety checks done during
51-
/// CanonicalizeOSSALifetime are needed here).
51+
/// OSSACanonicalizeOwned are needed here).
5252
void extendOwnedLifetime(SILValue ownedValue,
5353
PrunedLivenessBoundary &lifetimeBoundary,
5454
InstructionDeleter &deleter);

lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableAddressesChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@
163163
#include "swift/SILOptimizer/Analysis/LoopAnalysis.h"
164164
#include "swift/SILOptimizer/PassManager/Transforms.h"
165165
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
166-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
167166
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
167+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
168168
#include "swift/SILOptimizer/Utils/SILOptFunctionBuilder.h"
169169
#include "swift/SILOptimizer/Utils/SpecializationMangler.h"
170170
#include "llvm/ADT/PointerEmbeddedInt.h"

lib/SILOptimizer/Mandatory/ConsumeOperatorCopyableValuesChecker.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include "swift/SILOptimizer/Analysis/LoopAnalysis.h"
3434
#include "swift/SILOptimizer/PassManager/Transforms.h"
3535
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
36-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
36+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
3737

3838
using namespace swift;
3939

@@ -227,7 +227,7 @@ struct ConsumeOperatorCopyableValuesChecker {
227227
CheckerLivenessInfo livenessInfo;
228228
DominanceInfo *dominance;
229229
InstructionDeleter deleter;
230-
CanonicalizeOSSALifetime canonicalizer;
230+
OSSACanonicalizeOwned canonicalizer;
231231

232232
ConsumeOperatorCopyableValuesChecker(
233233
SILFunction *fn, DominanceInfo *dominance,

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerTester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@
4545
#include "swift/SILOptimizer/Analysis/DominanceAnalysis.h"
4646
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
4747
#include "swift/SILOptimizer/PassManager/Transforms.h"
48-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
4948
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
49+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
5050
#include "llvm/ADT/DenseMap.h"
5151
#include "llvm/ADT/MapVector.h"
5252
#include "llvm/ADT/PointerIntPair.h"

lib/SILOptimizer/Mandatory/MoveOnlyAddressCheckerUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@
259259
#include "swift/SILOptimizer/Analysis/DominanceAnalysis.h"
260260
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
261261
#include "swift/SILOptimizer/PassManager/Transforms.h"
262-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
263262
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
263+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
264264
#include "llvm/ADT/DenseMap.h"
265265
#include "llvm/ADT/MapVector.h"
266266
#include "llvm/ADT/PointerIntPair.h"
@@ -1472,7 +1472,7 @@ struct MoveOnlyAddressCheckerPImpl {
14721472
/// The instruction deleter used by \p canonicalizer.
14731473
InstructionDeleter deleter;
14741474

1475-
/// State to run CanonicalizeOSSALifetime.
1475+
/// State to run OSSACanonicalizeOwned.
14761476
OSSACanonicalizer canonicalizer;
14771477

14781478
/// Per mark must check address use state.

lib/SILOptimizer/Mandatory/MoveOnlyChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
#include "swift/SILOptimizer/Analysis/DominanceAnalysis.h"
4848
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
4949
#include "swift/SILOptimizer/PassManager/Transforms.h"
50-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
5150
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
51+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
5252
#include "llvm/ADT/DenseMap.h"
5353
#include "llvm/ADT/MapVector.h"
5454
#include "llvm/ADT/PointerIntPair.h"

lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerTester.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@
4242
#include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
4343
#include "swift/SILOptimizer/PassManager/Transforms.h"
4444
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
45-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
4645
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
46+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
4747
#include "swift/SILOptimizer/Utils/SILSSAUpdater.h"
4848
#include "clang/AST/DeclTemplate.h"
4949
#include "llvm/ADT/ArrayRef.h"

lib/SILOptimizer/Mandatory/MoveOnlyObjectCheckerUtils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@
4141
#include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
4242
#include "swift/SILOptimizer/PassManager/Transforms.h"
4343
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
44-
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
4544
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
45+
#include "swift/SILOptimizer/Utils/OSSACanonicalizeOwned.h"
4646
#include "swift/SILOptimizer/Utils/SILSSAUpdater.h"
4747
#include "clang/AST/DeclTemplate.h"
4848
#include "llvm/ADT/ArrayRef.h"
@@ -102,7 +102,7 @@ void OSSACanonicalizer::computeBoundaryData(SILValue value) {
102102
// Then use that information to stash for our diagnostics the boundary
103103
// consuming/non-consuming users as well as enter the boundary consuming users
104104
// into the boundaryConsumignUserSet for quick set testing later.
105-
using IsInterestingUser = CanonicalizeOSSALifetime::IsInterestingUser;
105+
using IsInterestingUser = OSSACanonicalizeOwned::IsInterestingUser;
106106
InstructionSet boundaryConsumingUserSet(value->getFunction());
107107
for (auto *lastUser : originalBoundary.lastUsers) {
108108
LLVM_DEBUG(llvm::dbgs() << "Looking at boundary use: " << *lastUser);

0 commit comments

Comments
 (0)