Skip to content

[cherry-pick][swift/release/6.0] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions #8696

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

Conversation

Michael137
Copy link

Prior to this change the debug-location for the
llvm.instrprof.increment intrinsic was set to whatever the current
DIBuilder's current debug location was set to. This meant that for
switch-statements, a counter's location was set to the previous case's
debug-location, causing confusing stepping behaviour in debuggers. This
patch makes sure we attach a dummy debug-location for the increment
instructions.

rdar://123050737
(cherry picked from commit 4113e15)

…structions (llvm#90717)

Prior to this change the debug-location for the
`llvm.instrprof.increment` intrinsic was set to whatever the current
DIBuilder's current debug location was set to. This meant that for
switch-statements, a counter's location was set to the previous case's
debug-location, causing confusing stepping behaviour in debuggers. This
patch makes sure we attach a dummy debug-location for the increment
instructions.

rdar://123050737
(cherry picked from commit 4113e15)
@Michael137
Copy link
Author

@swift-ci test

@Michael137 Michael137 requested a review from adrian-prantl May 4, 2024 07:18
@Michael137 Michael137 changed the title [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions [cherry-pick][swift/release/6.0] [clang][PGO] Apply artificial DebugLoc to llvm.instrprof.increment instructions May 4, 2024
@adrian-prantl adrian-prantl merged commit d470a64 into swiftlang:swift/release/6.0 May 4, 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.

2 participants