mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Optimizer: add InstructionRange.init(begin:,ends:) API
This commit is contained in:
@@ -59,6 +59,11 @@ struct InstructionRange : CustomStringConvertible, NoReflectionChildren {
|
|||||||
self.inExclusiveRange.insert(beginInst)
|
self.inExclusiveRange.insert(beginInst)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
init<S: Sequence>(begin beginInst: Instruction, ends: S, _ context: some Context) where S.Element: Instruction {
|
||||||
|
self = InstructionRange(begin: beginInst, context)
|
||||||
|
insert(contentsOf: ends)
|
||||||
|
}
|
||||||
|
|
||||||
init(for value: Value, _ context: some Context) {
|
init(for value: Value, _ context: some Context) {
|
||||||
self = InstructionRange(begin: InstructionRange.beginningInstruction(for: value), context)
|
self = InstructionRange(begin: InstructionRange.beginningInstruction(for: value), context)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user