[PATCH] D130072: [BOLT] Support split landing pad for stripped binaries

Huan Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 03:25:05 PDT 2022


nhuhuan created this revision.
Herald added subscribers: ayermolo, JDevlieghere.
Herald added a reviewer: rafauler.
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.

1. Establish sibling-fragment relation LSDA information is more reliable than heuristics Run partial parseLSDA() earlier to help jump table analysis Two phases: a. Early phase: Only validate landing pad targets. Stripped: Trust the correctness of LSDA information. Non-stripped: Verify using symbol name pattern. b. Late phase: Only process LSDA. Skip validation.
2. Update label for cross-function landing pad Previously cross-function targets are ignored. In this update: a. parseLSDA() Support landing pad at builtin_unreachable. Create local label for same-function landing pad. Create secondary entry for cross-function landing pad. Support recomputeLandingPad(). b. recomputeLandingPad() Support cross-function landing pads. Support when target function hasn't built CFG yet. Solution: rerun recomputeLandingPad() later. c. createEHTrampolines() Support cross-function landing pads. Support recomputeLandingPad().

Test Plan:

  ninja check-bolt


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D130072

Files:
  bolt/include/bolt/Core/BinaryFunction.h
  bolt/include/bolt/Core/Exceptions.h
  bolt/lib/Core/BinaryFunction.cpp
  bolt/lib/Core/Exceptions.cpp
  bolt/lib/Passes/SplitFunctions.cpp
  bolt/lib/Rewrite/RewriteInstance.cpp
  bolt/test/X86/split-landing-pad.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130072.445762.patch
Type: text/x-patch
Size: 15653 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220719/e6035138/attachment.bin>


More information about the llvm-commits mailing list