Skip to content

Commit 242049d

Browse files
committed
Rename AddressUseVisitor to AddressLifetimeDefUseWalker.
1 parent 4045074 commit 242049d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

SwiftCompilerSources/Sources/Optimizer/Utilities/OwnershipLiveness.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func computeInteriorLiveness(for definingValue: Value,
131131
///
132132
/// TODO: Verify that pointerEscape is only called for live ranges in which
133133
/// `findPointerEscape()` returns true.
134-
protocol AddressUseVisitor {
134+
protocol AddressLifetimeDefUseWalker {
135135
var _context: Context { get }
136136

137137
/// Start a def-use walk from and address.
@@ -190,7 +190,7 @@ protocol AddressUseVisitor {
190190
mutating func handle(borrow: LoadBorrowInst) -> WalkResult
191191
}
192192

193-
extension AddressUseVisitor {
193+
extension AddressLifetimeDefUseWalker {
194194
mutating func projection(of address: Operand) -> WalkResult {
195195
return .continueWalk
196196
}
@@ -651,7 +651,7 @@ extension OwnershipUseVisitor {
651651
///
652652
/// TODO: Change the operandOwnership of MarkDependenceInst base operand.
653653
/// It should be a borrowing operand, not a pointer escape.
654-
struct InteriorUseWalker: OwnershipUseVisitor, AddressUseVisitor {
654+
struct InteriorUseWalker: OwnershipUseVisitor, AddressLifetimeDefUseWalker {
655655
let context: FunctionPassContext
656656
var _context: Context { context }
657657

@@ -1022,7 +1022,7 @@ let interiorLivenessTest = FunctionTest("interior_liveness_swift") {
10221022
}
10231023

10241024
// Print the uses of an address.
1025-
struct AddressUsePrinter: AddressUseVisitor {
1025+
struct AddressLifetimeUsePrinter: AddressLifetimeDefUseWalker {
10261026
let _context: Context
10271027

10281028
mutating func leafUse(address: Operand) -> WalkResult {
@@ -1053,6 +1053,6 @@ let addressUseTest = FunctionTest("address_use_test") {
10531053
assert(address.type.isAddress)
10541054
print(function)
10551055
print("Uses of address: \(address)")
1056-
var printer = AddressUsePrinter(_context: context)
1056+
var printer = AddressLifetimeUsePrinter(_context: context)
10571057
_ = printer.walkDownUses(ofAddress: address)
10581058
}

0 commit comments

Comments
 (0)