[llvm] [GlobalMerge] Convert GlobalMerge to a ModulePass (PR #160703)
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 25 06:35:09 PDT 2025
asb wrote:
> > Going through commit history I was unable to find a justification for why it is written this way, so I will flag to reviewers that it's possible I'm missing something.
>
> This pass must run before `AsmPrinter::doInitialization`.
Thank you for clarifying why it's written the way it is! I'm seeing failures I don't see locally in the pre-commit CI build, which indicates I got lucky with the order of doInitialization locally.
Have you looked at all on whether it would be possible to remove this dependency?
> BTW the comment in AArch64 backend is outdated and misleading.
The comment can be removed for sure, but it's still a case of an in-tree user of the pass hoping they can have GlobalMerge run to clean up globals emitted by a previous pass. I came across this behaviour when prototyping a pass and looking to use GlobalMerge in the same way.
https://github.com/llvm/llvm-project/pull/160703
More information about the llvm-commits
mailing list