Commits

Michael Gottesman committed dc6deadc5d4
[simplify-cfg] Teach simplify cfg how to split struct/tuple BB arguments. The reason to do this is that a struct/tuple with multiple non-trivial fields does not have the same RC identity as its fields. This is b/c a retain_value on the struct/tuple acts as multiple reference counting operations in such a case implying we must be conservative. The two ways to solve this are: 1. To disassociate RC identity solely from SSA values to reasoning about SSA values and components of those values. This would add a lot of complication. 2. We can always split up the aggregates in such cases. We have already taken the approach of 2 in the guise of function signature optimization. This commit performs the same operation on basic block arguments (i.e. phi nodes). We only perform the operation if we have more than 1 non-trivial field. If we find reason to do it in all cases, we can extend the optimization. The changes on the perf test suite >= ~10% that I saw: Legend: Left: before. Right: after. -------------------------------------------------------------------------------- TITLE LEFT RIGHT RIGHT - LEFT RIGHT/LEFT Life 1118.00 738.00 -380.00 0.66 DictionaryHashableClass 34469.00 24465.00 -10004.00 0.71 Chars 1163.00 1051.00 -112.00 0.90 RecursiveOwnedParameter 2082.00 2265.00 183.00 1.09 DeadArray 160.00 184.00 24.00 1.15 The dead array regression is phantom since the actual object files are the same and the recursive owned parameter seems to be caused by small register allocation changes. Swift SVN r31756