You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GenericSpecializer: Allow simple function specialization cycles.
So far we immediately bailed once we detect a cycle in specializations. But it turned out that this prevented efficient code generation for some stdlib functions like compactMap.
With this change we allow specialization of cycles up to a depth of 1 (= still very limited to prevent code size explosion in some corner cases).
The effect of this optimization is tested with the existing benchmark FatCompactMap.
SR-7952, rdar://problem/41005326
Copy file name to clipboardExpand all lines: test/SILOptimizer/generic_specialization_loops_detection_with_loops.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,16 +21,16 @@
21
21
22
22
// Check that the compiler has produced a specialization information for a call-site that
23
23
// was inlined from a specialized generic function.
24
-
// CHECK-LABEL: // Generic specialization information for call-site $S044generic_specialization_loops_detection_with_C04foo4yyx_q_tr0_lF <Array<Int>, Array<Double>>
24
+
// CHECK-LABEL: // Generic specialization information for call-site $S044generic_specialization_loops_detection_with_C04foo4yyx_q_tr0_lFSaySays5UInt8VGG_SaySaySiGGTg5:
0 commit comments