Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 inMandatoryInlining
which happens beforeOSLogOptimization
.Main Branch PR: #79707 and #80712
Risk: Medium
Reviewed By: @ravikandhadai
Resolves: rdar://146793956
Testing: CI tests and some internal swift projects.