Skip to content

[SIL] Introduce the increment_profiler_counter instruction #60979

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

Merged
merged 1 commit into from
Sep 7, 2022

Conversation

hamishknight
Copy link
Contributor

This is a dedicated instruction for incrementing a profiler counter, which lowers to the llvm.instrprof.increment intrinsic. This replaces the builtin instruction that was previously used, and ensures that its arguments are statically known. This ensures that SIL optimization passes do not invalidate the instruction, fixing some code coverage cases in -O.

rdar://39146527

This is a dedicated instruction for incrementing a
profiler counter, which lowers to the
`llvm.instrprof.increment` intrinsic. This
replaces the builtin instruction that was
previously used, and ensures that its arguments
are statically known. This ensures that SIL
optimization passes do not invalidate the
instruction, fixing some code coverage cases in
`-O`.

rdar://39146527
@hamishknight
Copy link
Contributor Author

@swift-ci please test

@hamishknight
Copy link
Contributor Author

@swift-ci please build toolchain

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@hamishknight hamishknight merged commit f2995a1 into swiftlang:main Sep 7, 2022
@hamishknight hamishknight deleted the fixed-value branch September 7, 2022 21:41
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.

2 participants