-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Test] Run copy-propagation on SILOptimizer/opaque_values_mandatory.sil. #38179
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
[Test] Run copy-propagation on SILOptimizer/opaque_values_mandatory.sil. #38179
Conversation
The new flags sets the EnableCopyPropagation flag on the SILOpt[ion]s class used to determine the behavior of sil-opt.
1aa1822
to
9a0bdf3
Compare
@swift-ci please test |
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.
This run-line looks good to me.
-enable-ossa-modules currently enables non-mandatory copy propagation at -O only just so we can get a good performance baseline.
Build failed |
@@ -122,6 +122,10 @@ static llvm::cl::opt<bool> EnableOSSAModules( | |||
"this is disabled we do not serialize in OSSA " | |||
"form when optimizing.")); | |||
|
|||
static llvm::cl::opt<bool> EnableCopyPropagation( |
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.
We actually have two options -enable-copy-propagation and -disable-copy-propagation, both of which default to 'false'. Enabling either one overrides the default pipeline behavior, which depends on the optimization level and whether OSSA is enabled.
That should fix the test failures.
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.
It looks like swift-frontend
has those flags to control the EnableCopyPropagation
and DisableCopyPropagation
flags of the SILOptions
class, but sil-opt
doesn't (yet). Considering that they both have independent effects, it seems likely that at some point they'll both be useful for sil-opt
. I went ahead and pushed another commit ( 7e5747b ) to add -disable-copy-propagation
to sil-opt
to set DisableCopyPropagation
to true
( like -enable-copy-propagation
does for EnableCopyPropagation
in sil-opt
as of 7e5747b ).
The test failures were
Swift(macosx-x86_64) :: Interpreter/SDK/objc_bridge_cast.swift
Swift(macosx-x86_64) :: Interpreter/SDK/objc_dealloc.swift
and seem to be unrelated, affecting other PRs, like https://ci.swift.org/job/swift-PR-macos/28081/consoleText .
The new flags sets the DisableCopyPropagation flag on the SILOpt[ion]s class used to determine the behavior of sil-opt.
@swift-ci please test |
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.
LGTM
@swift-ci please test windows platform |
@swift-ci please clean test windows platform |
1 similar comment
@swift-ci please clean test windows platform |
No description provided.