[PATCH] D154604: [BOLT] Calculate output values using BOLTLinker

Maksim Panchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 16:30:04 PDT 2023


maksfb added inline comments.


================
Comment at: bolt/lib/Core/BinaryContext.cpp:192
+  // the linker will never see them.
+  Ctx->setAllowTemporaryLabels(false);
+
----------------
Background: we've discussed offline that this change causes a noticeable BOLT runtime regression.

The alternative approach for mapping input to output addresses used for address translation, will be to generate a map in a section that we can read and discard later (i.e. skip writing to a file). The map/section contents will be an ordered list of pairs `<InputAddress, OutputAddress>`. For output address we will emit the temporary symbol to the section. I believe `BOLTLinker` should be able to process it.

With the approach above, we can continue to emit all internal symbols as temps and avoid the regression.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154604



More information about the llvm-commits mailing list