[PATCH] D80765: [ELF] Handle bitcode comdat groups separately to deduplicate thinlto comdat sections
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 17 23:11:35 PDT 2020
MaskRay added a subscriber: pcc.
MaskRay added a comment.
Apologies for my slowness getting to this patch.
`symtab->ltoOutputComdatGroups` does work:
% readelf -g a3.o.lto.o a3.o1.lto.o
File: a3.o.lto.o
COMDAT group section [ 4] `.group' [4068369915778327548] contains 2 sections:
[Index] Name
[ 5] .debug_types
[ 6] .rela.debug_types
File: a3.o1.lto.o
COMDAT group section [ 4] `.group' [4068369915778327548] contains 2 sections:
[Index] Name
[ 5] .debug_types
[ 6] .rela.debug_types
The .debug_types from a3.o1.lto.o can be discarded by the new COMDAT logic. However, I am concerned that making it general as this patch does can miss some codegen bugs. See @pcc's argument in
in https://reviews.llvm.org/D56015#1339411 . Since .debug_types (notably, a non-SHF_ALLOC section) is the only COMDAT rule this patch will discard, how about special casing .debug_types (i.e. if isLTOOutput && the group is related to .debug_types)?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80765/new/
https://reviews.llvm.org/D80765
More information about the llvm-commits
mailing list