mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +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:
@@ -66,7 +66,7 @@ struct BasicBlockRange : CustomStringConvertible, NoReflectionChildren {
|
||||
private var inExclusiveRange: BasicBlockSet
|
||||
private var worklist: BasicBlockWorklist
|
||||
|
||||
init(begin: BasicBlock, _ context: PassContext) {
|
||||
init(begin: BasicBlock, _ context: some Context) {
|
||||
self.begin = begin
|
||||
self.inclusiveRange = Stack(context)
|
||||
self.inserted = Stack(context)
|
||||
|
||||
Reference in New Issue
Block a user