[PATCH] D128561: [BOTL] Support split landing pad

Huan Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 24 16:16:42 PDT 2022


nhuhuan created this revision.
Herald added a reviewer: rafauler.
Herald added a subscriber: ayermolo.
Herald added a reviewer: Amir.
Herald added a reviewer: maksfb.
Herald added a project: All.
nhuhuan requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D128561

Files:
  bolt/lib/Core/Exceptions.cpp
  bolt/lib/Rewrite/RewriteInstance.cpp
  bolt/test/X86/split-landing-pad.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128561.439914.patch
Type: text/x-patch
Size: 9975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220624/b601a2cc/attachment.bin>


More information about the llvm-commits mailing list