[all-commits] [llvm/llvm-project] ae563c: [BOLT] Support split landing pad

Huan Nguyen via All-commits all-commits at lists.llvm.org
Thu Jul 14 18:10:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae563c914655ed4535f13f1e01c5cb482130e909
      https://github.com/llvm/llvm-project/commit/ae563c914655ed4535f13f1e01c5cb482130e909
  Author: Huan Nguyen <nhuhuan at yahoo.com>
  Date:   2022-07-14 (Thu, 14 Jul 2022)

  Changed paths:
    M bolt/lib/Core/Exceptions.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    A bolt/test/X86/split-landing-pad.s

  Log Message:
  -----------
  [BOLT] Support split landing pad

We previously support split jump table, where some jump table entries
target different fragments of same function. In this fix, we provide
support for another type of intra-indirect transfer: landing pad.

When C++ exception handling is used, compiler emits .gcc_except_table
that describes the location of catch block (landing pad) for specific
range that potentially invokes a throw(). Normally landing pads reside
in the function, but with -fsplit-machine-functions, landing pads can
be moved to another fragment. The intuition is, landing pads are rarely
executed, so compiler can move them to .cold section.

This update will mark all fragments that have landing pad to another
fragment as non-simple, and later propagate non-simple to all related
fragments.

This update also includes one manual test case: split-landing-pad.s

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D128561




More information about the All-commits mailing list