Skip to content

Conversation

@meg-gupta
Copy link
Contributor

@meg-gupta meg-gupta commented Apr 21, 2025

Explanation: #79707 was reverted because it led to missed OSLogOptimization for simple tests under different configuration of stdlib (-Osize/-Onone). This is because stdlib's FixedWidthInteger.bitwidth and others were not inlined and the optimization missed to determine these calls as constants.

This PR brings back #79707 along with #80712 which fixes the exposed issues.

With #80712, stdlib's FixedWidthInteger.bitwidth and others are marked as @_transparent which inlines them in MandatoryInlining which happens before OSLogOptimization.

Main Branch PR: #79707 and #80712

Risk: Medium

Reviewed By: @ravikandhadai

Resolves: rdar://146793956

Testing: CI tests and some internal swift projects.

@_transparent will ensure there are inlined in MandatoryInlining which runs before OSLogOptimization.

OSLogOptimization does not look through their calls because they are not marked with
@_semantics("constant_evaluable") which requires them to also be annotated as @_optimize(none)

rdar://148256435
Revert "Merge pull request swiftlang#80767 from meg-gupta/reverttransparent"

This reverts commit 198a802, reversing
changes made to 8eb43af.
@meg-gupta meg-gupta requested a review from a team as a code owner April 21, 2025 18:29
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

Need #80971 for the failing test on macOS

@meg-gupta
Copy link
Contributor Author

@swift-ci test macOS platform

@DougGregor
Copy link
Member

This should have the full template for cherry-picks. Also, it's tracked by rdar://146793956

@meg-gupta
Copy link
Contributor Author

@DougGregor Updated the PR template for release/6.2

@DougGregor
Copy link
Member

@swift-ci please test macOS

@meg-gupta meg-gupta merged commit e4b60db into swiftlang:release/6.2 Apr 23, 2025
5 checks passed
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