Previously, we just always promoted destroy_addr. With ownership, this does not
work as well since we need to be able to reason about the take operation that we
are performing. In the general case, this would require adding code to
pred-memopts for tracking reads and for compensation store code since we would
need to eliminate the store of the taken value to prevent a double use.
I am going to loop back around later in the year and add back this code once the
time is available. I filed SR-6341. In case any third party contributor is
interested in looking at re-enabling this optimization before I get back to it.
rdar://31521023
When we determine that a potential archetype's stated conformance to a
protocol is redundant because the superclass of that potential
archetype already conforms to that conformance, mark this conformance
as "inherited". Inherited conformances are dropped when building both
the archetype (because the conformance is recoverable via the
superclass) and when building the generic signature.
Previously, the latter occurred (because these were classified as
"redundant"), but the former did not, leading to inconsistencies in
the archetypes built from an explicitly-written "where" clause
vs. ones reconstituted from the generic signature.
Pair-programmed with Arnold. Fixes rdar://problem/29223093.