@@ -50,7 +50,7 @@ private func optimizeFunctionsTopDown(using worklist: inout FunctionWorklist,
50
50
return
51
51
}
52
52
53
- optimize ( function: f, context, & worklist, isEmbeddedSwift : moduleContext . options . enableEmbeddedSwift )
53
+ optimize ( function: f, context, & worklist)
54
54
}
55
55
}
56
56
}
@@ -60,7 +60,7 @@ fileprivate struct PathFunctionTuple: Hashable {
60
60
var function : Function
61
61
}
62
62
63
- private func optimize( function: Function , _ context: FunctionPassContext , _ worklist: inout FunctionWorklist , isEmbeddedSwift : Bool ) {
63
+ private func optimize( function: Function , _ context: FunctionPassContext , _ worklist: inout FunctionWorklist ) {
64
64
var alreadyInlinedFunctions : Set < PathFunctionTuple > = Set ( )
65
65
66
66
var changed = true
@@ -78,15 +78,15 @@ private func optimize(function: Function, _ context: FunctionPassContext, _ work
78
78
79
79
// Embedded Swift specific transformations
80
80
case let alloc as AllocRefInst :
81
- if isEmbeddedSwift {
81
+ if context . options . enableEmbeddedSwift {
82
82
specializeVTableAndAddEntriesToWorklist ( for: alloc. type, in: function, context, & worklist)
83
83
}
84
84
case let metatype as MetatypeInst :
85
- if isEmbeddedSwift {
85
+ if context . options . enableEmbeddedSwift {
86
86
specializeVTableAndAddEntriesToWorklist ( for: metatype. type, in: function, context, & worklist)
87
87
}
88
88
case let classMethod as ClassMethodInst :
89
- if isEmbeddedSwift {
89
+ if context . options . enableEmbeddedSwift {
90
90
_ = context. specializeClassMethodInst ( classMethod)
91
91
}
92
92
0 commit comments