@@ -134,7 +134,7 @@ struct AliasAnalysis {
134134 if let apply = inst as? FullApplySite {
135135 // Workaround for quadratic complexity in ARCSequenceOpts.
136136 // 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 )
138138 return effect. destroy
139139 }
140140 return obj. at ( path) . isEscaping ( using: EscapesToInstructionVisitor ( target: inst, isAddress: false ) ,
@@ -421,10 +421,10 @@ struct AliasAnalysis {
421421 }
422422
423423 private func getOwnershipEffect( of apply: FullApplySite , for value: Value ,
424- path: SmallProjectionPath ) -> SideEffects . Ownership {
424+ path: SmallProjectionPath ,
425+ complexityBudget: Int ) -> SideEffects . Ownership {
425426 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) {
428428 // The resulting effects are the argument effects to which `value` escapes to.
429429 return result. ownership
430430 } else {
0 commit comments