-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[IRLinker] Don't add duplicate named MD node operand to dest module #146020
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
base: main
Are you sure you want to change the base?
Conversation
Fix llvm.ident exploding when linking many bitcode files in libclc. This should de-duplicate other named metadata as well, e.g. opencl.spir.version and opencl.ocl.version. This PR is a re-submit of https://reviews.llvm.org/D20582 with update that only checks MD node pointer for duplication according to review comment in that PR.
@llvm/pr-subscribers-lto Author: Wenju He (wenju-he) ChangesFix llvm.ident exploding when linking many bitcode files in libclc. This should de-duplicate other named metadata as well, e.g. opencl.spir.version and opencl.ocl.version. This PR is a re-submit of https://reviews.llvm.org/D20582 with update that only checks MD node pointer for duplication according to review comment in that PR. Full diff: https://github.com/llvm/llvm-project/pull/146020.diff 5 Files Affected:
|
Since that patch got stuck we've had this pass to work around it. |
Can you add tests that cover the behavior for these other nodes:
I'm not sure if we should opt in for specific named metadata |
Unfortunately, this problem is not unique to AMDGPU target. Do you think we should make unify-metadata pass target independent and run it for other targets as well (e.g. SPIR-V)? |
The pass is garbage, the linker should be doing this. A follow up patch should delete it. IMO nobody is ever going to do the suggested work of making uniquability a configurable property for named metadata |
thanks @arsenm I was looking at history of the AMDGPUUnifyMetadata pass, and then found your patch https://reviews.llvm.org/D20582 |
done in 1a881cc Differences between this PR's output and AMDGPUUnifyMetadata pass:
|
Fix llvm.ident exploding when linking many bitcode files in libclc. This should de-duplicate other named metadata as well, e.g. opencl.spir.version and opencl.ocl.version.
This PR is a re-submit of https://reviews.llvm.org/D20582 with update that only checks MD node pointer for duplication according to review comment in that PR.