Skip to content

Conversation

@aschwaighofer
Copy link
Contributor

github.com//issues/68708
rdar://115905828

@aschwaighofer
Copy link
Contributor Author

Please test with following PR:
swiftlang/llvm-project#8130

@swift-ci test

Copy link
Contributor

@adrian-prantl adrian-prantl left a 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!

if (Level != OptimizationLevel::O0)
MPM.addPass(createModuleToFunctionPassAdaptor(SwiftARCContractPass()));
if (Level == OptimizationLevel::O0)
MPM.addPass(AlwaysInlinerPass());
Copy link
Contributor

@felipepiovezan felipepiovezan Feb 8, 2024

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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!

Copy link
Contributor

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.

if (Level != OptimizationLevel::O0)
MPM.addPass(createModuleToFunctionPassAdaptor(SwiftARCContractPass()));
if (Level == OptimizationLevel::O0)
MPM.addPass(AlwaysInlinerPass());
Copy link
Contributor

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!

@aschwaighofer aschwaighofer merged commit 61326af into swiftlang:main Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants