-
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
IRGen: Mark async intrinsic helper functions as always inline #71414
Conversation
github.com/swiftlang/issues/68708 rdar://115905828
Please test with following PR: @swift-ci 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 looks fine from the debug info side!
@@ -263,6 +263,8 @@ void swift::performLLVMOptimizations(const IRGenOptions &Opts, | |||
OptimizationLevel Level) { | |||
if (Level != OptimizationLevel::O0) | |||
MPM.addPass(createModuleToFunctionPassAdaptor(SwiftARCContractPass())); | |||
if (Level == OptimizationLevel::O0) | |||
MPM.addPass(AlwaysInlinerPass()); |
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.
Are we sure this (the instance added by this PR) is the only place the alwaysinline attribute is used? Because by adding an optimization pass at O0 we might be changing more than what we intended to change.
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.
The default O0 llvm pass pipeline runs the AlwaysInlinerPass
. Unfortunately just to early for our purposes i.e before Coro splitting.
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.
Got it, thanks for the clarification!
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.
Also, at least as far as debugging is concerned, inlining is a 100% "reversible" operation, i.e., it should be transparent in the debugger.
@@ -263,6 +263,8 @@ void swift::performLLVMOptimizations(const IRGenOptions &Opts, | |||
OptimizationLevel Level) { | |||
if (Level != OptimizationLevel::O0) | |||
MPM.addPass(createModuleToFunctionPassAdaptor(SwiftARCContractPass())); | |||
if (Level == OptimizationLevel::O0) | |||
MPM.addPass(AlwaysInlinerPass()); |
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.
Got it, thanks for the clarification!
github.com//issues/68708
rdar://115905828