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

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 14 02:33:12 PDT 2018


evgeny777 updated this revision to Diff 160539.
evgeny777 added a comment.

It turned out that the problem is more complex than it seemed initially, because this forward declaration causes metadata loader to do really horrible things. Here is how metadata of `test/ThinLTO/X86/fwd-decl.ll` looks after both modules are loaded by `addRegularLTO`:

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


https://reviews.llvm.org/D50066

Files:
  lib/Linker/IRMover.cpp
  test/ThinLTO/X86/Inputs/fwd-decl.ll
  test/ThinLTO/X86/fwd-decl.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D50066.160539.patch
Type: text/x-patch
Size: 4620 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180814/21306622/attachment.bin>


More information about the llvm-commits mailing list