Skip to content

Commit 4fc42a6

Browse files
committed
[CanonicalizeOSSALifetime] Renamed file.
Matched to the name of the utility.
1 parent 8a3dc10 commit 4fc42a6

13 files changed

+22
-22
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CanonicalOSSALifetime.h - Canonicalize OSSA lifetimes --*- C++ -*-===//
1+
//===- CanonicalizeOSSALifetime.h - Canonicalize OSSA lifetimes -*- C++ -*-===//
22
//
33
// This source file is part of the Swift.org open source project
44
//

lib/SILOptimizer/Mandatory/MoveKillsCopyableAddressesChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
#include "swift/SILOptimizer/Analysis/LoopAnalysis.h"
162162
#include "swift/SILOptimizer/PassManager/Transforms.h"
163163
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
164-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
164+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
165165
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
166166
#include "swift/SILOptimizer/Utils/SILOptFunctionBuilder.h"
167167
#include "swift/SILOptimizer/Utils/SpecializationMangler.h"

lib/SILOptimizer/Mandatory/MoveKillsCopyableValuesChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include "swift/SILOptimizer/Analysis/LoopAnalysis.h"
3131
#include "swift/SILOptimizer/PassManager/Transforms.h"
3232
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
33-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
33+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
3434

3535
using namespace swift;
3636

lib/SILOptimizer/Mandatory/MoveOnlyAddressChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
142142
#include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
143143
#include "swift/SILOptimizer/PassManager/Transforms.h"
144-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
144+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
145145
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
146146
#include "llvm/ADT/DenseMap.h"
147147
#include "llvm/ADT/PointerIntPair.h"

lib/SILOptimizer/Mandatory/MoveOnlyObjectChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
3232
#include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
3333
#include "swift/SILOptimizer/PassManager/Transforms.h"
34-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
34+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
3535
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
3636
#include "llvm/ADT/PointerIntPair.h"
3737
#include "llvm/ADT/PointerUnion.h"

lib/SILOptimizer/Mandatory/MoveOnlyWrappedTypeEliminator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include "swift/SILOptimizer/Analysis/NonLocalAccessBlockAnalysis.h"
4040
#include "swift/SILOptimizer/Analysis/PostOrderAnalysis.h"
4141
#include "swift/SILOptimizer/PassManager/Transforms.h"
42-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
42+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
4343

4444
using namespace swift;
4545

lib/SILOptimizer/SILCombiner/SILCombine.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
#include "swift/SILOptimizer/Analysis/SimplifyInstruction.h"
3434
#include "swift/SILOptimizer/PassManager/PassManager.h"
3535
#include "swift/SILOptimizer/PassManager/Transforms.h"
36-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
3736
#include "swift/SILOptimizer/Utils/CanonicalizeBorrowScope.h"
3837
#include "swift/SILOptimizer/Utils/CanonicalizeInstruction.h"
38+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
3939
#include "swift/SILOptimizer/Utils/DebugOptUtils.h"
4040
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
4141
#include "swift/SILOptimizer/Utils/SILOptFunctionBuilder.h"

lib/SILOptimizer/Transforms/CopyPropagation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
#include "swift/SILOptimizer/Analysis/DeadEndBlocksAnalysis.h"
4747
#include "swift/SILOptimizer/PassManager/Passes.h"
4848
#include "swift/SILOptimizer/PassManager/Transforms.h"
49-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
5049
#include "swift/SILOptimizer/Utils/CanonicalizeBorrowScope.h"
50+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
5151
#include "swift/SILOptimizer/Utils/InstOptUtils.h"
5252
#include "llvm/ADT/SetVector.h"
5353

@@ -306,7 +306,7 @@ static void findPreheadersOnControlEquivalentPath(
306306
/// Sink \p ownedForward to its uses.
307307
///
308308
/// Owned forwarding instructions are identified by
309-
/// CanonicalOSSALifetime::isRewritableOSSAForward().
309+
/// CanonicalizeOSSALifetime::isRewritableOSSAForward().
310310
///
311311
/// Assumes that the uses of ownedForward jointly postdominate it (valid OSSA).
312312
///

lib/SILOptimizer/Utils/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ target_sources(swiftSILOptimizer PRIVATE
22
BasicBlockOptUtils.cpp
33
CFGOptUtils.cpp
44
CanonicalizeInstruction.cpp
5-
CanonicalOSSALifetime.cpp
5+
CanonicalizeOSSALifetime.cpp
66
CanonicalizeBorrowScope.cpp
77
CastOptimizer.cpp
88
CheckedCastBrJumpThreading.cpp

lib/SILOptimizer/Utils/CanonicalizeBorrowScope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "swift/SIL/InstructionUtils.h"
2828
#include "swift/SIL/OwnershipUtils.h"
2929
#include "swift/SILOptimizer/Utils/CFGOptUtils.h"
30-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
30+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
3131
#include "swift/SILOptimizer/Utils/DebugOptUtils.h"
3232
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
3333
#include "swift/SILOptimizer/Utils/ValueLifetime.h"

lib/SILOptimizer/Utils/CanonicalOSSALifetime.cpp renamed to lib/SILOptimizer/Utils/CanonicalizeOSSALifetime.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//===--- CanonicalOSSALifetime.cpp - Canonicalize OSSA value lifetimes ----===//
1+
//===-- CanonicalizeOSSALifetime.cpp - Canonicalize OSSA value lifetimes --===//
22
//
33
// This source file is part of the Swift.org open source project
44
//
@@ -29,7 +29,7 @@
2929
/// 4. Rewrite `def`s original copies and destroys, inserting new copies where
3030
/// needed. Deletes original copies and destroys and inserts new copies.
3131
///
32-
/// See CanonicalOSSALifetime.h for examples.
32+
/// See CanonicalizeOSSALifetime.h for examples.
3333
///
3434
/// TODO: Canonicalization currently bails out if any uses of the def has
3535
/// OperandOwnership::PointerEscape. Once project_box is protected by a borrow
@@ -56,7 +56,7 @@
5656

5757
#define DEBUG_TYPE "copy-propagation"
5858

59-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
59+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
6060
#include "swift/SIL/InstructionUtils.h"
6161
#include "swift/SIL/NodeDatastructures.h"
6262
#include "swift/SIL/OwnershipUtils.h"

lib/SILOptimizer/Utils/LexicalDestroyFolding.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
1010
//
1111
//===----------------------------------------------------------------------===//
12-
/// After ShrinkBorrowScope and CanonicalOSSALifetime both run, when a final use
13-
/// of the extended simple lifetime of a begin_borrow [lexical] is as an owned
14-
/// argument, we will have the following pattern:
12+
/// After ShrinkBorrowScope and CanonicalizeOSSALifetime both run, when a final
13+
/// use of the extended simple lifetime of a begin_borrow [lexical] is as an
14+
/// owned argument, we will have the following pattern:
1515
///
1616
/// %result = apply %fn(..., %copy, ...) : $... (..., @owned Ty, ...)
1717
/// end_borrow %lifetime : $Ty
@@ -86,8 +86,8 @@
8686
#include "swift/SIL/SILInstruction.h"
8787
#include "swift/SIL/SILNode.h"
8888
#include "swift/SILOptimizer/Analysis/Reachability.h"
89-
#include "swift/SILOptimizer/Utils/CanonicalOSSALifetime.h"
9089
#include "swift/SILOptimizer/Utils/CanonicalizeBorrowScope.h"
90+
#include "swift/SILOptimizer/Utils/CanonicalizeOSSALifetime.h"
9191
#include "swift/SILOptimizer/Utils/InstructionDeleter.h"
9292
#include "swift/SILOptimizer/Utils/SILSSAUpdater.h"
9393
#include "llvm/ADT/SmallVector.h"
@@ -685,9 +685,9 @@ DestroyValueInst *
685685
FindCandidates::findNextBorroweeDestroy(SILInstruction *from) const {
686686
for (auto *inst = from; inst; inst = inst->getNextInstruction()) {
687687
if (!CanonicalizeOSSALifetime::ignoredByDestroyHoisting(inst->getKind())) {
688-
// This is not an instruction that CanonicalOSSALifetime would not hoist a
689-
// destroy above. In other words, CanonicalOSSALifetime would have
690-
// hoisted
688+
// This is not an instruction that CanonicalizeOSSALifetime would not
689+
// hoist a destroy above. In other words, CanonicalizeOSSALifetime would
690+
// have hoisted
691691
// destroy_value %borrowee
692692
// over this instruction if it could have. Stop looking.
693693
return nullptr;

lib/SILOptimizer/Utils/ShrinkBorrowScope.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
//
1111
//===----------------------------------------------------------------------===//
1212
/// Shrink borrow scopes by hoisting end_borrows up to deinit barriers. After
13-
/// this is done, CanonicalOSSALifetime is free to hoist the destroys of the
13+
/// this is done, CanonicalizeOSSALifetime is free to hoist the destroys of the
1414
/// owned value up to the end_borrow. In this way, the lexical lifetime of
1515
/// guaranteed values is preserved.
1616
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)