[PATCH] D17982: [lto] Don't lazy load metadata for now.

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 9 06:33:15 PST 2016


tejohnson added a subscriber: tejohnson.
tejohnson added a comment.

With lazy metadata loading something needs to call materializeMetadata before the IRMover is invoked. Not sure there is an advantage to delaying it in this case, but see the suggestion below for where that could be done.

Rafael, should the IRLinker just always invoke materializeMetadata on the module (if shouldLinkMetadata() is true, which will avoid doing that if we plan to do post-pass metadata linking for ThinLTO)? I'm already invoking materializeMetadata when we detect we are in the postpass md linking. Probably could just move that outside the IsMetadataLinkingPostpass guard in IRMover.cpp. I can send a patch right now to do that, I don't know how to test lld but Sean can give it a try.


================
Comment at: ELF/SymbolTable.cpp:147
@@ -146,3 +146,3 @@
   }
   Mover.move(std::move(M), Keep, [](GlobalValue &, IRMover::ValueAdder) {});
 }
----------------
Call M->materializeMetadata() above here as an alternative.


http://reviews.llvm.org/D17982





More information about the llvm-commits mailing list