Skip to content

Revert recent dead-code elimination improvement in constant prop. #40317

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
Nov 30, 2021

Conversation

atrick
Copy link
Contributor

@atrick atrick commented Nov 29, 2021

Revert part of a fix that used InstructionDeleter consistently during
ConstantPropagation. This had a side effect of removing more dead code
at -Onone. For some reason, that breaks SIL linkage. This showed up
when rebuilding the Foundation module against a debug (-Onone)
standard library, and verifying Data.InlineData.subscript.getter.

Fixes rdar://85809683 (Swift CI: SIL verification failed: external
declarations of SILFunctions with shared visibility is not allowed:
SingleFunction || !hasSharedVisibility(RefF->getLinkage()) ||
RefF->hasForeignBody())

Revert part of a fix that used InstructionDeleter consistently during
ConstantPropagation. This had a side effect of removing more dead code
at -Onone. For some reason, that breaks SIL linkage. This showed up
when rebuilding the Foundation module against a debug (-Onone)
standard library, and verifying Data.InlineData.subscript.getter.

Fixes rdar://85809683 (Swift CI: SIL verification failed: external
declarations of SILFunctions with shared visibility is not allowed:
SingleFunction || !hasSharedVisibility(RefF->getLinkage()) ||
RefF->hasForeignBody())
@atrick atrick requested review from ahoppen and eeckstein November 29, 2021 23:34
@atrick
Copy link
Contributor Author

atrick commented Nov 29, 2021

@swift-ci smoke test and merge

@swift-ci swift-ci merged commit 95a4ea4 into swiftlang:main Nov 30, 2021
@atrick atrick deleted the fix-constprop-deleter branch November 30, 2021 05:20
@eeckstein
Copy link
Contributor

thanks!

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