Skip to content

SILOptimizer: Disable invalid passes in C++-only compiler #80920

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

Conversation

etcwilde
Copy link
Member

The SimplifyCFG and LoopRotate passes result in verification failures when built in a compiler that is not built with Swift sources enabled.

Fixes: rdar://146357242

@etcwilde etcwilde requested review from atrick and tbkka April 18, 2025 20:48
@etcwilde etcwilde requested a review from eeckstein as a code owner April 18, 2025 20:48
@etcwilde
Copy link
Member Author

@swift-ci please test

The SimplifyCFG and LoopRotate passes result in verification failures
when built in a compiler that is not built with Swift sources enabled.

Fixes: rdar://146357242
@etcwilde etcwilde force-pushed the ewilde/cxxonly-disable-broken-passes branch from 4ce4b19 to bca1378 Compare April 21, 2025 19:46
@etcwilde
Copy link
Member Author

@swift-ci please test

1 similar comment
@etcwilde
Copy link
Member Author

@swift-ci please test

@etcwilde etcwilde merged commit 82bccb5 into swiftlang:main Apr 23, 2025
5 checks passed
@3405691582
Copy link
Member

3405691582 commented Apr 25, 2025

FYI: this seems to cause a compiler crash when bootstrapping (with Concurrency enabled) trying to compile Deque+Storage.swift. Retaining the SimplifyCFG pass avoids the crash.

Stackdump fragment:

1.      Swift version 6.2-dev (LLVM b1e56f1b39b82cd, Swift bca1378fdbf1c58)     
2.      Compiling with effective version 5.10                                   
3.      While evaluating request ExecuteSILPipelineRequest(Run pipelines {      
PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, H
ighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Fun
ction, LateLoopOpt, SIL Debug Info Generator } on SIL for _Concurrency)         
4.      While running pass #496334 SILFunctionTransform "CodeSinking" on SI     
LFunction "@$ss6_DequeV8_StorageV13_growCapacity2to8linearlyS2i_SbtFyt_Tg5".    
 for '_growCapacity(to:linearly:)' ...

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