[PATCH] D50066: [IRMover] Don't materialise values from different source module

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 12 10:35:56 PDT 2018


trentxintong added a comment.

Hi @evgeny777 @tejohnson

I dumped the Composite right after the 2nd file is merged. Things look good except the DITemplateValueParameter debuginfo looks a bit odd. Does this look correct to you ?

(gdb) p Composite.dump()
; ModuleID = 'ld-temp.o'
source_filename = "ld-temp.o"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.TA = type {}

@gv = external dso_local global %struct.TA*

define i32 @c() !dbg !13 {

  %1 = bitcast %struct.TA** @gv to i8*
  unreachable

}

define i1 @b(%struct.TA*) {

  unreachable

}

define i1 @a(%struct.TA*) {

  %2 = call i1 @b(%struct.TA* %0)
  unreachable

}

!llvm.dbg.cu = !{!0, !6}
!llvm.module.flags = !{!11, !12}

!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, retainedTypes: !2)
!1 = !DIFile(filename: "f2", directory: "")
!2 = !{!3}
!3 = distinct !DICompositeType(tag: DW_TAG_class_type, scope: !5, file: !4, identifier: "SHARED")
!4 = !DIFile(filename: "f1", directory: "")
!5 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !6)
!6 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !4, isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug, retainedTypes: !7)
!7 = !{!8, !3}
!8 = !DICompositeType(tag: DW_TAG_class_type, scope: !5, file: !4, templateParams: !9)
!9 = !{!10}
!10 = !DITemplateValueParameter(value: i1 (%"type 0x4439360"*)* @b)
!11 = !{i32 2, !"Debug Info Version", i32 3}
!12 = !{i32 1, !"ThinLTO", i32 0}
!13 = distinct !DISubprogram(scope: null, isLocal: false, isDefinition: true, isOptimized: false, unit: !0)


https://reviews.llvm.org/D50066





More information about the llvm-commits mailing list