mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Swift Optimizer: rework pass context types and instruction passes
* split the `PassContext` into multiple protocols and structs: `Context`, `MutatingContext`, `FunctionPassContext` and `SimplifyContext` * change how instruction passes work: implement the `simplify` function in conformance to `SILCombineSimplifyable` * add a mechanism to add a callback for inserted instructions
This commit is contained in:
@@ -61,8 +61,7 @@ struct Stack<Element> : CollectionLikeSequence {
|
||||
}
|
||||
}
|
||||
|
||||
init(_ context: PassContext) { self.bridgedContext = context._bridged }
|
||||
init(_ context: ModulePassContext) { self.bridgedContext = context._bridged }
|
||||
init(_ context: some Context) { self.bridgedContext = context._bridged }
|
||||
|
||||
func makeIterator() -> Iterator {
|
||||
return Iterator(slab: firstSlab, index: 0, lastSlab: lastSlab, endIndex: endIndex)
|
||||
|
||||
Reference in New Issue
Block a user