@@ -134,7 +134,7 @@ struct AliasAnalysis {
134
134
if let apply = inst as? FullApplySite {
135
135
// Workaround for quadratic complexity in ARCSequenceOpts.
136
136
// We need to use an ever lower budget to not get into noticeable compile time troubles.
137
- let effect = aa. getOwnershipEffect ( of: apply, for: obj, path: path)
137
+ let effect = aa. getOwnershipEffect ( of: apply, for: obj, path: path, complexityBudget : budget / 10 )
138
138
return effect. destroy
139
139
}
140
140
return obj. at ( path) . isEscaping ( using: EscapesToInstructionVisitor ( target: inst, isAddress: false ) ,
@@ -421,10 +421,10 @@ struct AliasAnalysis {
421
421
}
422
422
423
423
private func getOwnershipEffect( of apply: FullApplySite , for value: Value ,
424
- path: SmallProjectionPath ) -> SideEffects . Ownership {
424
+ path: SmallProjectionPath ,
425
+ complexityBudget: Int ) -> SideEffects . Ownership {
425
426
let visitor = FullApplyEffectsVisitor ( apply: apply, calleeAnalysis: context. calleeAnalysis, isAddress: false )
426
- let budget = getComplexityBudget ( for: apply. parentFunction)
427
- if let result = value. at ( path) . visit ( using: visitor, complexityBudget: budget, context) {
427
+ if let result = value. at ( path) . visit ( using: visitor, complexityBudget: complexityBudget, context) {
428
428
// The resulting effects are the argument effects to which `value` escapes to.
429
429
return result. ownership
430
430
} else {
0 commit comments