Skip to content
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

Fix bug in dropped variable statistics for SIL. #79924

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rastogishubham
Copy link
Contributor

@rastogishubham rastogishubham commented Mar 11, 2025

When checking for false positives, we want to make sure that if a debug_value is dropped, we also find a real instruction that shares the same scope as the debug_value or has a scope that is a child of the scope of the debug_value, and has an inlinedAt equal to the inlinedAt of the debug_value or it's inlinedAt chain contains the inlinedAt of the debug_value. However, this instruction shouldn't be another debug_value.

The check was supossed to check if(!I.isDebugInstruction()) but it checked if(I.isDebugInstruction())

This patch fixes that bug.

When checking for false positives, we want to make sure that if a
debug_value is dropped, we also find a real instruction that shares
the same scope as the debug_value or has a scope that is a child
of the scope of the debug_value, and has an inlinedAt equal to the
inlinedAt of the debug_value or it's inlinedAt chain contains the
inlinedAt of the debug_value. However, this instruction shouldn't be
another debug_value.

The check was supossed to check if(!I.isDebugInstruction())
but it checked if(I.isDebugInstruction())

This patch fixes that bug.
@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test Linux

@rastogishubham
Copy link
Contributor Author

@swift-ci please smoke test macOS

@rastogishubham
Copy link
Contributor Author

@swift-ci please test Windows

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.

1 participant