Re: [swift-dev] State of Semantic ARC?

2017-07-09 Thread Bob Wilson via swift-dev

> On Jul 8, 2017, at 10:36 AM, Johannes Weiß via swift-dev 
>  wrote:
> 
> Hi swift-dev,
> 
> I haven't heard anything about semantic ARC and couldn't really find much 
> documentation besides 
> https://gottesmm.github.io/proposals/high-level-arc-memory-operations.html . 
> So I wanted to ask how much of it is implemented and what the plan for Swift 
> 4/5 regarding Semantic ARC is.
> 
> — Johannes

During the course of Swift 4 development, we realized that there were other 
changes that we wanted to make for SIL to preserve semantic information, 
besides the changes initially proposed for improving ARC optimizations. In 
particular, there were some important changes for memory ownership and the 
handling of opaque “address-only” values. Thus, we renamed the project to 
“Semantic SIL” instead of “Semantic ARC”. But that’s just the project name….

Michael may want to chime in here with more details, but the basic status is 
that the planned changes for high-level memory operations and ownership are 
done and included in Swift 4. There is a verifier that detects violations of 
the model and has already caught a number of serious bugs. However, the new 
form of SIL is transformed back to the old form early in the SIL optimizer 
pipeline (see the sil-ownership-model-eliminator pass). We will be gradually 
updating more of the optimizer to work with the new form of SIL, and moving the 
sil-ownership-model-eliminator pass later in the pipeline. Michael is currently 
working to get all the mandatory passes updated. These changes will not be in 
Swift 4. Revising the ARC optimizer to take advantage of the new information 
will be one of the later steps and it is unclear when that work will be done — 
it may end up being split into some incremental steps.

The other big part of Semantic SIL is changing to represent opaque 
“address-only” values as SSA values in SIL. Much of the groundwork for that is 
done (e.g., the address-lowering SIL pass) but it is disabled for Swift 4. 
We’re hoping to resume work on this soon.
___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev


Re: [swift-dev] State of Semantic ARC?

2017-07-09 Thread Michael Gottesman via swift-dev

> On Jul 8, 2017, at 10:36 AM, Johannes Weiß via swift-dev 
>  wrote:
> 
> Hi swift-dev,
> 
> I haven't heard anything about semantic ARC and couldn't really find much 
> documentation besides 
> https://gottesmm.github.io/proposals/high-level-arc-memory-operations.html . 
> So I wanted to ask how much of it is implemented and what the plan for Swift 
> 4/5 regarding Semantic ARC is.

Many of Semantic ARC's changes were in Swift 4, but we did not turn on the 
ownership verifier for Swift 4. This is because getting the stdlib to pass the 
verifier (a constraint for turning it on for non-stdlib code) would have been 
too disruptive at that time to land. The overall plan is to continue working on 
Semantic ARC (If you look at the commits list, I have been landing code for it 
recently). In fact, I just got stdlibCore (*note*, not the entire stdlib) to 
pass the ownership verifier, so progress is being made.

Did I answer your question?

Michael

> 
> -- Johannes
> ___
> swift-dev mailing list
> swift-dev@swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

___
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev