-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[arc] Change guaranteed arc opts to be based on SemanticARCOpts and move from Diagnostic pipeline -> Onone pipeline. #32390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[arc] Change guaranteed arc opts to be based on SemanticARCOpts and move from Diagnostic pipeline -> Onone pipeline. #32390
Conversation
@swift-ci test |
Once this is done, I am going to remove that flag and then I am going to start moving the ownership lowering down the pipeline a bit. |
@swift-ci benchmark |
Performance: -O
Code size: -OPerformance: -Osize
Code size: -OsizePerformance: -Onone
Code size: -swiftlibsHow to read the dataThe tables contain differences in performance which are larger than 8% and differences in code size which are larger than 1%.If you see any unexpected regressions, you should consider fixing the Noise: Sometimes the performance results (not code size!) contain false Hardware Overview
|
Build failed |
32 bit strike again! :doh: |
…ove from Diagnostic pipeline -> Onone pipeline. The pass is already not being run during normal compilation scenarios today since it bails on OSSA except in certain bit-rot situations where a test wasn't updated and so was inadvertently invoking the pass. I discovered these while originally just trying to eliminate the pass from the diagnostic pipeline. The reason why I am doing this in one larger change is that I found there were a bunch of sil tests inadvertently relying on guaranteed arc opts to eliminate copy traffic. So, if I just removed this and did this in two steps, I would basically be unoptimizing then re-optimizing the tests. Some notes: 1. The new guaranteed arc opts is based off of SemanticARCOpts and runs only on ossa. Specifically, in this new pass, we just perform simple canonicalizations that do not involve any significant analysis. Some examples: a copy_value all of whose uses are destroys. This will do what the original pass did and more without more compile time. I did a conservative first approximation, but we can probably tune this a bit. 2. the reason why I am doing this now is that I was trying to eliminate the enable-ownership-stripping-after-serialization flag and discovered that the test opaque_value_mandatory implicitly depends on this since sil-opt by default was the only place left in the compiler with that option set to false by default. So I am eliminating that dependency before I land the larger change.
897d264
to
702c1bc
Compare
Nope, I was wrong. Actual problem was that on 32 bit we were changing the struct to be indirect. So not a direct 32/64 bit issue. |
@swift-ci test |
Build failed |
Build failed |
@swift-ci smoke test OS X platform |
@swift-ci test |
@gottesmm I am compiling https://github.com/manGoweb/MimeLib on Windows. It consists of only three source files. One of them is huge enum with about 300+ cases. And another one contains two big switch statements using that huge enum. Normally it takes about 10 seconds to build, but now it is about 20 minutes. |
@lxbndr can you file a bug on bugs.swift.org and post the bug # here? |
The pass is already not being run during normal compilation scenarios today
since it bails on OSSA except in certain bit-rot situations where a test wasn't
updated and so was inadvertently invoking the pass. I discovered these while
originally just trying to eliminate the pass from the diagnostic pipeline. The
reason why I am doing this in one larger change is that I found there were a
bunch of sil tests inadvertently relying on guaranteed arc opts to eliminate
copy traffic. So, if I just removed this and did this in two steps, I would
basically be unoptimizing then re-optimizing the tests.
Some notes:
The new guaranteed arc opts is based off of SemanticARCOpts and runs only on
ossa. Specifically, in this new pass, we just perform simple
canonicalizations that do not involve any significant analysis. Some
examples: a copy_value all of whose uses are destroys. This will do what the
original pass did and more without more compile time. I did a conservative
first approximation, but we can probably tune this a bit.
the reason why I am doing this now is that I was trying to eliminate the
enable-ownership-stripping-after-serialization flag and discovered that the
test opaque_value_mandatory implicitly depends on this since sil-opt by
default was the only place left in the compiler with that option set to false
by default. So I am eliminating that dependency before I land the larger
change.
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.