Commits
Michael Gottesman committed 735a23a0a34
[sil-combine] Rewrite unchecked_addr_cast to access layout compatible first element fields via typed GEPS. A first element field of a nominal type is either the first element of a struct or the first payload of an enum. We currently allow the stdlib to rappel into struct heirarchies using reinterpretCast. This patch teaches the optimizer how to rewrite such unchecked_addr_cast into unchecked_enum_data_addr and struct_element_addr instructions. Then Mem2Reg and Load Store Forwarding will remove the allocation generated by such uses of reinterpret cast. <rdar://problem/16703656> Swift SVN r18977