[llvm] [llvm][Inliner] Don't inline functions referencing local COMDAT globals (PR #202687)
Alexis Engelke via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 10 02:11:35 PDT 2026
https://github.com/aengelke commented:
I don't think we should pessimize optimizations here. Can we instead move the global to a new comdat group if it is referenced in two different comdats?
Also, given that inlines into differing comdats are common but references to comdat globals are not, we should avoid an extra pass over the IR (iterating over the IR is expensive). Instead, maybe after cloning we could look at all uses of the globals in the comdat group of the inlined function that belong to the new parent function?
https://github.com/llvm/llvm-project/pull/202687
More information about the llvm-commits
mailing list