[BOLT] Improve Linux Kernel ORC reader
authorMaksim Panchenko <maks@fb.com>
Wed, 19 Jul 2023 23:55:32 +0000 (16:55 -0700)
committerMaksim Panchenko <maks@fb.com>
Fri, 21 Jul 2023 02:06:10 +0000 (19:06 -0700)
commitec4ddc2809a42b25fee0c9997b57920b3c81dee4
tree2e62dd8b5003510b3ccbe54515e608bbde04a1d8
parent4c2980c1a3c74bd292c3c9d8d740fa7e053971f8
[BOLT] Improve Linux Kernel ORC reader

  * Sort ORC entries in the internal table. Older Linux kernels did not
    sort them in the file (only during boot time).
  * Add an option to dump sorted ORC tables (--dump-orc).
  * Associate entries in the internal ORC table with a BinaryFunction
    even when we are not changing the function.
  * If the function doesn't have ORC entry at the start, propagate ORC
    state from a previous entry.

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D155767
bolt/lib/Rewrite/LinuxKernelRewriter.cpp
bolt/test/X86/orc_unwind.s [new file with mode: 0644]