-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[semantic-arc-opts] Implement @owned phi web elimination for phi webs with a single phi node that only have copy_value introducers. #30289
Conversation
@swift-ci test |
@swift-ci benchmark |
@swift-ci test source compatibility |
This is also one of the most simple cases, so I am not necessarily expecting a large change in perf. Will take what I can get though = p. |
Performance: -OCode 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
|
I think the release failure is a problem on the bot. Saw this:
|
Reproduced the failure locally. I wonder if it is non-deterministic. |
Debug source compat passed. I think the release one hit a race. Going to rerun. |
@swift-ci test source compatibility |
One of the failures in release suite looks real and actually related to the logic. Other has to do with my not being aggressive enough using autogenerated locations. |
Looking at the failures now. |
… with a single phi node that only have copy_value introducers. This is the most simple initial version that I can commit. The hope is that this will help to bring this up in a nice way. I am going to handle the multiple phi node and load [copy] case later to reduce code churn. <rdar://problem/56720436>
Found the core store issue. I used a propagated a branch location onto a begin_borrow. I just changed it to use an autogenerated location. |
0245ac3
to
6fee59b
Compare
Both turned out to be the loc issue. |
@swift-ci test source compatibility |
@swift-ci test |
@atrick was just thinking. I think the same approach here would work with tuples and other aggregate forming instructions. They act as a phi in a certain sense of their operand's ownership. |
I talked with Andy offline. I am going to refactor parts of it according to his asks in a forthcoming commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few insignificant comments... This and all the offline feedback can go into a separate PR
return destroyingUses.front(); | ||
} | ||
|
||
/// If this LiveRange has a single unknown destroying use, return that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unknown destroying use
To be consistent: "unknown consuming use"
ArrayRef<Operand *> getNonConsumingForwardingUses() const { | ||
return generalForwardingUses; | ||
} | ||
|
||
void convertOwnedGeneralForwardingUsesToGuaranteed(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
convertOwnedGeneralForwardingUsesToGuaranteed
This declaration has a cryptic name, so should have a doc comment description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have a patch but it conflicts my other fix patch. I am going to wait for that to land then get to this.
Hi @gottesmm – This breaks my Fedora 31 box (x86_64). Do you have a quick fix or can we revert this? [EDIT] – Updated with a debug backtrace:
|
…24a8c8f9422956 Recommit #30289 with ASAN fix.
…0070d8cd472328 [semantic-arc-opts] Follow ups to #30289
This is the most simple initial version that I can commit. The hope is that this will help to bring this up in a nice way.
I am going to handle the multiple phi node and load [copy] case later to reduce
code churn.
rdar://problem/56720436