Skip to content

Fix debug scope for SIL instructions created in LowerHopToActor #38802

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
Aug 9, 2021

Conversation

meg-gupta
Copy link
Contributor

The pass uses SILBuilder instant to create instructions and does not
set SILDebugScope.
Due to this, SILVerifier correctly asserts that basic blocks contain non-contiguous
lexical scopes at -Onone.
The long term fix would be to replace SILBuilder instance in the pass with
SILBuilderContext and use SILBuilderWithScope so that such bugs do not come up.

The pass uses SILBuilder instant to create instructions and does not
set SILDebugScope.
Due to this, SILVerifier correctly asserts that basic blocks contain non-contiguous
lexical scopes at -Onone.
The long term fix would be to replace SILBuilder instance in the pass with
SILBuilderContext and use SILBuilderWithScope so that such bugs do not come up.
@meg-gupta
Copy link
Contributor Author

@swift-ci test

@meg-gupta
Copy link
Contributor Author

@swift-ci test windows platform

@meg-gupta meg-gupta marked this pull request as ready for review August 9, 2021 03:48
Copy link
Contributor

@atrick atrick left a comment

Choose a reason for hiding this comment

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

Oh no, someone used the SILBuilder insertionPoint API 😞

@meg-gupta meg-gupta merged commit 5c507eb into swiftlang:main Aug 9, 2021
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