-
Notifications
You must be signed in to change notification settings - Fork 123
Disable optimization to work around a compiler bug #807
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
Disable optimization to work around a compiler bug #807
Conversation
This disables optimization on one function to work around a Swift compiler bug in the LLVM 21 rebranch. Bug: swiftlang/llvm-project#11377
@swift-ci please smoke test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely disabling LLVM optimizations here is probably going to have a very large impact on build perf. I think we need to take a closer look at the root cause before considering this workaround
@owenv we are investigating the LLVM side of the issue. PEI is at fault here, and changing that is going to take some time. This is to unblock the work for the rebranch. |
I've started a build in swiftlang/swift#71188 to see how far we get. If this is the only issue then we still have time to keep investigating. Worst case we might be able to split things up and only apply |
Could we restrict the attr to only target Windows? The bug seems to imply this only affects the windows prologue/epilogue emission? |
I'll see about limiting it to Windows/arm64, since it is the only affected platform AFAIK. |
#if os(Windows)
@_optimize(none)
#endif Should do the trick. |
ok, I'm ok with accepting this as a temporary change if we take @AnthonyLatsis 's suggestion |
Thanks, done! |
@swift-ci please smoke test |
@swift-ci test (we don't have smoke test jobs in this repo bc they don't build the whole stack) |
There appears to be another problematic function in SwiftPM: https://ci-external.swift.org/job/swift-PR-build-toolchain-windows-arm64/42/console |
@swift-ci please test linux platform |
@swift-ci please test macos platform |
It looks like there is still one unrelated failure here but I can't re-run the job. |
FYI, I got the full Windows arm64 toolchain building locally in conjunction with swiftlang/swift-package-manager#9178 |
This is ok to merge, the failing job isn't fully brought up yet |
) The compiler bug has been fixed so the workaround is no longer necessary. Bug: swiftlang/llvm-project#11377
The compiler bug has been fixed so the workaround is no longer necessary. Bug: swiftlang/llvm-project#11377
This disables optimization on one function to work around a Swift compiler bug in the LLVM 21 rebranch.
Bug: swiftlang/llvm-project#11377