Skip to content

Commit ce5e2fb

Browse files
committed
Swift SIL: use InstructionSet (instead of Set<Instruction>) in InstructionRange
1 parent 49a5b3e commit ce5e2fb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

SwiftCompilerSources/Sources/Optimizer/DataStructures/InstructionRange.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ struct InstructionRange : CustomStringConvertible, CustomReflectable {
4646
/// The underlying block range.
4747
private(set) var blockRange: BasicBlockRange
4848

49-
private var insertedInsts: Set<Instruction>
49+
private var insertedInsts: InstructionSet
5050

5151
init(begin beginInst: Instruction, _ context: PassContext) {
5252
self.begin = beginInst
53-
self.insertedInsts = Set<Instruction>()
5453
self.blockRange = BasicBlockRange(begin: beginInst.block, context)
54+
self.insertedInsts = InstructionSet(context)
5555
}
5656

5757
/// Insert a potential end instruction.
@@ -143,6 +143,7 @@ struct InstructionRange : CustomStringConvertible, CustomReflectable {
143143

144144
/// TODO: once we have move-only types, make this a real deinit.
145145
mutating func deinitialize() {
146+
insertedInsts.deinitialize()
146147
blockRange.deinitialize()
147148
}
148149
}

0 commit comments

Comments
 (0)