[PATCH] D80765: [lld] Handle bitcode comdat groups separately to deduplicate thinlto comdat sections
Sam Clegg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 29 14:15:21 PDT 2020
sbc100 added a comment.
In D80765#2063931 <https://reviews.llvm.org/D80765#2063931>, @christylee wrote:
> @sbc100 What would be a good way to go about writing a test for this? The reason why I noticed this bug was because .debug_types are not deduplicated in thinlto, but writing a lld test case using debug metadata seems clunky.
>
>
> I've also tried something like this but it doesn't repro:
>
> ; REQUIRES: x86
> ; RUN: llvm-as %s -o %t.o
> ; RUN: llc %t.o -o %t2.o -filetype=obj
> ; RUN: ld.lld %t.o %t2.o %t.o %t2.o -o %t3.o --shared
> ; RUN: llvm-readobj --symbols %t3.o | FileCheck %s
>
> ; CHECK: Name: foo
> ; CHECK-NEXT: Value:
> ; CHECK-NEXT: Size: 1
> ; CHECK-NEXT: Binding: Global
> ; CHECK-NEXT: Type: Function
> ; CHECK-NEXT: Other: 0
> ; CHECK-NEXT: Section: .text
>
> target triple = "x86_64-unknown-linux-gnu"
> target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
>
> $foo = comdat any
> define void @foo() comdat {
> ret void
> }
>
I'm sorry I've not looked into this in much detail but shouldn't this same bug reproduce with all comdats? Maybe there is something different about debug metatdata? BTW, the test above doesn't use lto or thinglto does it?
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