[PATCH] D147544: [BOLT] Move from RuntimeDyld to JITLink

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 17:41:47 PDT 2023


rafauler added a comment.

Hi all,

It would be nice if somebody with better access to AArch64 binaries test this diff. I took another look at this diff and most of my small AArch64 tests look fine, except for one that crashes with:

"BOLT-ERROR: JITLink failed: Unsupported aarch64 relocation:279: R_AARCH64_TSTBR14"

But I only have trivial SPEC programs built for AArch64, probably @yota9 is in a better position to evaluate this on more complex AArch64 binaries.

I have two issues on the X86 side that needs investigating: first, in most tests we look fine, but there is one binary that is mismatching eh_frame contents. Upon further inspection, I noticed that addresses of some functions in FDEs look off:

F27479087: Screenshot 2023-05-16 at 4.07.20 PM.png <https://reviews.llvm.org/F27479087>

To the left, we have reference BOLT, to the right, BOLT with this patch. This address 0x1c0c322d doesn't exist in the binary. This is HHVM binary (c++ with exceptions), built with GCC, being processed with "-lite=1 -reorder-functions=hfsort", but the issue might reproduce in any binary with lite=1 and eh_frame. It looks like addresses of functions that are not hot are getting corrupted, but it's just a guess.

Second issue is a large regression in wall time when running with assertions enabled. Running BOLT with -time-rewrite option and optimizing clang itself, we have:

Original BOLT:

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  33.3125 ( 32.0%)   0.2820 (  0.4%)  33.5946 ( 18.9%)  33.5972 ( 51.4%)  emit and link

BOLT with JITLink:

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  --- Name ---
  134.1916 ( 64.9%)   0.1047 (  0.1%)  134.2963 ( 47.2%)  134.3034 ( 79.6%)  emit and link

We run BOLT with assertions and they're usually not _that_ expensive.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D147544



More information about the llvm-commits mailing list