Skip to content

Conversation

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Mar 18, 2025

ravikandhadai and others added 2 commits March 17, 2025 17:06
OSLogOptimization pass

The OSLogOptimization pass constant evaluates and folds SIL instructions
that are inlined from the construction of the string interpolations passed
to the log calls, which enables replacing the dynamic format string construction
with a static format string. In addition to folding constant strings, it also folds
constant integers and arrays whose elements are constants. This change makes it
skip folding static strings, since they are already efficiently represented.

rdar://146028438
(cherry picked from commit cbf804e)
The integer conversion operations were inlinable, but aren't getting
inlined in debug builds, which results in unreasonably poor
performance. Mark them as transparent so we don't end up with
unspecialized generic code in the hot path.

Fixes swiftlang#78501
@DougGregor DougGregor requested a review from a team as a code owner March 18, 2025 00:07
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor DougGregor merged commit 8923a9d into swiftlang:release/6.1 Mar 18, 2025
5 checks passed
@DougGregor DougGregor deleted the integer-conversion-transparent-6.1 branch March 18, 2025 17:02
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