[PATCH] D87970: [ThinLTO] Avoid temporaries when loading global decl attachment metadata

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 19 16:11:03 PDT 2020


tejohnson added a comment.

I realized after intentionally suppressing the new method that there was no regression test that broke. It turns out that the lazy loading index is only emitted if there is a certain number of metadatas, which the tests that exercise this code apparently don't have. Therefore, I added an option to drop the threshold for one of the ThinLTO WPD tests. This exposed a bug: Because parseGlobalObjectAttachment now resolves forward references via the index, the index cursor has moved when it returns, and we weren't parsing all of the global decl attachment metadatas. Fixed by saving and restoring the current position around that call.

My compile time test didn't expose this because it was NDEBUG. I confirmed that it now parses all the expected metadata records. The metadata materialization time under -fwhole-program-vtables goes from 1s up to 2s. Will update the summary accordingly.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87970/new/

https://reviews.llvm.org/D87970



More information about the llvm-commits mailing list