[PATCH] D27635: [ThinLTO] Import only necessary DICompileUnit fields

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 9 16:39:43 PST 2016


aprantl added a comment.

As far as I understand it this looks fine/safe to me from the debug info perspective.



================
Comment at: lib/Linker/IRMover.cpp:1015
+// which will automatically prevent their importing when reached
+// from the DICompileUnit during metadata mapping.
+void IRLinker::linkImportedCompileUnits() {
----------------
not-pick: The coding guidelines want this comment on the declaration in the header file and using `///`.


================
Comment at: lib/Linker/IRMover.cpp:1025
+    // imported DICompileUnit. This means they will only be imported
+    // if reached from the mapped IR.
+    ValueMap.MD()[CU->getRawEnumTypes()].reset(nullptr);
----------------
Add a comment that they will be precessed when we compile the originating module itself?


================
Comment at: test/ThinLTO/X86/debuginfo-cu-import.ll:14
+; CHECK-NOT: DICompileUnit{{.*}} retainedTypes:
+; CHECK-NOT: DICompileUnit{{.*}} globals:
+; CHECK: DICompileUnit{{.*}} imports: ![[IMP:[0-9]+]]
----------------
I'm not sure this does what we want to. How many DICompileUnits do we expect in the final output? If there is more than one, this will only check the first one.


https://reviews.llvm.org/D27635





More information about the llvm-commits mailing list