Commits

Michael Gottesman committed 7b4a1764007
[enum-simplification] Emit simplest refcount op on payload when moving ref count ops from enums to payloads. Specifically, 1. If we have a trivial type we emit nothing. 2. If we have a type with reference semantics we emit strong_{retain,release}. 3. If we have a non-trivial non-reference semantic type, emit {retain,release}_value. Before we always emitted {retain,release}_value with the idea that SILCombine would canonicalize. This creates a phase ordering issue since the ARC optimizer (the main thing this pass is supposed to help), does not have a SILCombine iteration run in between the two passes in the pass ordering. Of course we could put in another SILCombine in between the two, but why not just do the *right thing*. I also fixed a bug where when merging predecessors, we were blotting pointers as we performed our dataflow intersection instead of blotting all pointers that the intersection removes afterwards. This causes a problem since release hoisting also gathers information in that loop about the various enum tags available in predecessors. Once the pointer is bloted, we stop iterating implying that we will not be able to prove that the given BB is the end of a switch region (implying we can hoist releases on enums into the switch region and place said releases on the enum payloads). Swift SVN r20063