Skip to content

[Test] Use -disable-llvm-merge-function-pass to unblock MergeFunc fix. #79632

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
Mar 14, 2025

Conversation

fhahn
Copy link
Contributor

@fhahn fhahn commented Feb 26, 2025

To unblock CI for swiftlang/llvm-project#10112.

@fhahn
Copy link
Contributor Author

fhahn commented Feb 26, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Feb 26, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Feb 26, 2025

This seems to fail the windows test, but from the log it is not clear to me if this is an issue related to swiftlang/llvm-project#10112?

@compnerd
Copy link
Member

It possibly could be. The merge functions would potentially have removed previously invalid IRGen. Unfortunately, it is difficult to tell what is going on without having a dump of the module itself to see what COMDATs are being keyed improperly.

@fhahn
Copy link
Contributor Author

fhahn commented Feb 26, 2025

It possibly could be. The merge functions would potentially have removed previously invalid IRGen. Unfortunately, it is difficult to tell what is going on without having a dump of the module itself to see what COMDATs are being keyed improperly.

@compnerd it looks like this is a Windows-only crash

FAILED: stdlib/public/Concurrency/WINDOWS/x86_64/_Concurrency.obj T:/x86_64-unknown-windows-msvc/Runtime/stdlib/public/Concurrency/WINDOWS/x86_64/_Concurrency.obj 
...
3.	Running pass 'Function Pass Manager' on module 'T:/x86_64-unknown-windows-msvc/Runtime/stdlib/public/Concurrency//WINDOWS/x86_64/_Concurrency.obj'.
4.	Running pass 'X86 Assembly Printer' on function '@78'

Any chance you could help with extracting the IR for that file?

@compnerd
Copy link
Member

I'm in middle of a refactoring of the build script, so I cannot get through a complete build atm. Once that is done, I can help. I can help you get setup with a local build though.

@hjyamauchi
Copy link
Contributor

My machines are also busy atm but I will try getting info when I can

@fhahn
Copy link
Contributor Author

fhahn commented Feb 27, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Feb 27, 2025

I'm trying to see if I can get the IR by dumping it for the failing tests.

@hjyamauchi
Copy link
Contributor

Any luck?

@compnerd
Copy link
Member

Looking at the IR:

<unknown>:0: note: Associative COMDAT symbol '$sShySiGIgo_AAIegr_TR0133$s11Observation0A9RegistrarV5State33_5AE0855755CD62D4521FC18D42BC1E4BLLV16registerTracking3for6didSetSiShys10AnyKeyPathCG_yAKYbctFShyQ7GyXEfu_Tf3npf_n' is not a key for its COMDAT.
$"$sShySiGIgo_AAIegr_TR0133$s11Observation0A9RegistrarV5State33_5AE0855755CD62D4521FC18D42BC1E4BLLV16registerTracking3for6didSetSiShys10AnyKeyPathCG_yAKYbctFShyQ7GyXEfu_Tf3npf_n" = comdat any

define linkonce_odr hidden swiftcc void @"$sShySiGIgo_AAIegr_TR0133$s11Observation0A9RegistrarV5State33_5AE0855755CD62D4521FC18D42BC1E4BLLV16registerTracking3for6didSetSiShys10AnyKeyPathCG_yAKYbctFShyQ7GyXEfu_Tf3npf_n"(ptr noalias nocapture sret(%TSh) %0) #0 comdat {
  store ptr @_swiftEmptySetSingleton, ptr %0, align 8
  ret void
}

The function does not have a key for the COMDAT - comdat vs comdat($"$sShySiGIgo_AAIegr_TR0133$s11Observation0A9RegistrarV5State33_5AE0855755CD62D4521FC18D42BC1E4BLLV16registerTracking3for6didSetSiShys10AnyKeyPathCG_yAKYbctFShyQ7GyXEfu_Tf3npf_n") is what would key it.

@hjyamauchi
Copy link
Contributor

I started a local build with this in case it will be still useful

@fhahn fhahn force-pushed the disable-merge-func-for-test branch from 1407160 to 5a4209e Compare March 6, 2025 14:08
@fhahn
Copy link
Contributor Author

fhahn commented Mar 7, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Mar 7, 2025

@compnerd @hjyamauchi I managed to get a reproducer out of the build logs. IIUC the issue was the we dropped the combat from one of the merged functions. Fixing that via swiftlang/llvm-project@6f1edfc seems to work.

I'll also prepare a patch for upstream.

@fhahn
Copy link
Contributor Author

fhahn commented Mar 10, 2025

@compnerd @hjyamauchi The patch for upstream is here llvm/llvm-project#130583

@fhahn fhahn force-pushed the disable-merge-func-for-test branch from 5a4209e to a21b5f7 Compare March 10, 2025 11:21
@fhahn
Copy link
Contributor Author

fhahn commented Mar 10, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn fhahn force-pushed the disable-merge-func-for-test branch from a21b5f7 to 793dc14 Compare March 13, 2025 18:51
@fhahn
Copy link
Contributor Author

fhahn commented Mar 13, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Mar 13, 2025

@swift-ci please smoke test

@fhahn fhahn force-pushed the disable-merge-func-for-test branch from 793dc14 to dff5da4 Compare March 14, 2025 09:49
@fhahn
Copy link
Contributor Author

fhahn commented Mar 14, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci test

@fhahn
Copy link
Contributor Author

fhahn commented Mar 14, 2025

Please test with following PR:
swiftlang/llvm-project#10112

@swift-ci please smoke test

@fhahn fhahn merged commit c95ec9c into main Mar 14, 2025
5 checks passed
@fhahn fhahn deleted the disable-merge-func-for-test branch March 14, 2025 20:32
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.

4 participants