-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[ownership] Enable GlobalOpt on ossa and add ossa tests #32621
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
Conversation
@swift-ci test |
Build failed |
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'm not sure what's being tested. Can you please add some comments to globalopt_trivial_nontrivial.sil?
|
||
@_hasStorage @_hasInitialValue let trivialglobal: TStruct { get } | ||
|
||
@_hasMissingDesignatedInitializers public class TClass { |
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.
You may need to move extraneous attributes like @_hasMissingDesignatedInitializers
and @objc
so the test works on non-mac platforms
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.
Done.
@swift-ci smoke test |
@atrick Added comments to |
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.
Thanks!
) GlobalOpt works mostly on trivial values (there are special cases for ObjectInst and ValueToBridgeObjectInst). optimizeGlobalAccess is explicitly turned off for non-trivial values. optimizeInitializer calls SILGlobalVariable::isValidStaticInitializerInst which limits it to mostly trivial values except for special cases for ObjectInst and ValueToBridgeObjectInst. This changes adds GlobalOpt tests for ossa and enables GlobalOpt on ossa
) GlobalOpt works mostly on trivial values (there are special cases for ObjectInst and ValueToBridgeObjectInst). optimizeGlobalAccess is explicitly turned off for non-trivial values. optimizeInitializer calls SILGlobalVariable::isValidStaticInitializerInst which limits it to mostly trivial values except for special cases for ObjectInst and ValueToBridgeObjectInst. This changes adds GlobalOpt tests for ossa and enables GlobalOpt on ossa Co-authored-by: Meghana Gupta <meghanavgupta@gmail.com>
GlobalOpt works mostly on trivial values (there are special cases for
ObjectInst
andValueToBridgeObjectInst
).optimizeGlobalAccess
is explicitly turned off for non-trivial values.optimizeInitializer
callsSILGlobalVariable::isValidStaticInitializerInst
which limits it to mostly trivial values except for special cases forObjectInst
andValueToBridgeObjectInst
.This changes adds GlobalOpt tests for ossa and enables GlobalOpt on ossa