Re: [swift-dev] [arc optimization] Why doesn't enum destructuring use guaranteed references?

2017-12-29 Thread Michael Gottesman via swift-dev
> On Dec 29, 2017, at 4:58 PM, Félix Cloutier wrote: > > Thanks Michael! Other people might have different opinions, but knowing that > a "definitive" fix is on the way is plenty for me and I'm not looking to make > a fuss. No worries. Happy to help = ). If you are interested, I would be hap

Re: [swift-dev] "available externally" vs build time

2017-12-29 Thread Michael Gottesman via swift-dev
> On Dec 28, 2017, at 7:32 PM, Chris Lattner via swift-dev > wrote: > > Folks working on the SIL optimizer, particularly those interested in faster > builds: > > If I understand the SIL optimizer correctly, it seems that when the current > program references an external symbol declared as @

Re: [swift-dev] [arc optimization] Why doesn't enum destructuring use guaranteed references?

2017-12-29 Thread Michael Gottesman via swift-dev
> On Dec 28, 2017, at 4:27 PM, Chris Lattner via swift-dev > wrote: > > > > This is a great question, I’m not sure what the answer is: maybe it is a > simple case missed by the arc optimizer? It is a bit more complicated than that. There are codegen aspects and optimization aspects. In bo

Re: [swift-dev] [arc optimization] Why doesn't enum destructuring use guaranteed references?

2017-12-29 Thread Michael Gottesman via swift-dev
(FYI I am already writing a longer response, but got interrupted by visiting with my mother ; )). Give me a bit. > On Dec 29, 2017, at 2:03 PM, Robert Widmann wrote: > > Ran into this over the summer. My understanding is that Michael Gottesman > (CC’d) has been looking into pattern matching a

Re: [swift-dev] [arc optimization] Why doesn't enum destructuring use guaranteed references?

2017-12-29 Thread Robert Widmann via swift-dev
Ran into this over the summer. My understanding is that Michael Gottesman (CC’d) has been looking into pattern matching at +0. The code in SILGenPattern needs to be reworked, but I found this problem intersects with the really old dynamic casting entry points in SILGen too which would seem to