mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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)
|
||||
}
|
||||
|
||||
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) {
|
||||
self = InstructionRange(begin: InstructionRange.beginningInstruction(for: value), context)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user