[all-commits] [llvm/llvm-project] ae2b4d: [BOLT] Fragment all blocks (not just outlineable b...

Fabian Parzefall via All-commits all-commits at lists.llvm.org
Thu Sep 8 17:17:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ae2b4da16664a684341aa611309cfd302afe5ffa
      https://github.com/llvm/llvm-project/commit/ae2b4da16664a684341aa611309cfd302afe5ffa
  Author: Fabian Parzefall <parzefall at fb.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M bolt/include/bolt/Passes/SplitFunctions.h
    M bolt/lib/Passes/SplitFunctions.cpp

  Log Message:
  -----------
  [BOLT] Fragment all blocks (not just outlineable blocks)

To enable split strategies that require view of the entire CFG (e.g. to
estimate cost of path from entry block), with this patch, all blocks of
a function are passed to `SplitStrategy::fragment`. Because this might
move non-outlineable blocks into a split fragment, these blocks are
moved back into the main fragment after fragmenting. This also gives
strategies the option to specify whether empty fragments should be
kept or removed.

Reviewed By: maksfb

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


  Commit: 3ac46f377a06f344705f334640c4e1d5eca4e9c0
      https://github.com/llvm/llvm-project/commit/3ac46f377a06f344705f334640c4e1d5eca4e9c0
  Author: Fabian Parzefall <parzefall at fb.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M bolt/include/bolt/Core/BinaryFunction.h
    M bolt/lib/Core/BinaryEmitter.cpp
    M bolt/lib/Core/BinaryFunction.cpp
    M bolt/lib/Core/Exceptions.cpp
    M bolt/lib/Passes/SplitFunctions.cpp
    A bolt/test/X86/fragmented-symbols.s
    M bolt/test/runtime/X86/exceptions-pic.test
    A bolt/test/runtime/X86/rethrow.cpp

  Log Message:
  -----------
  [BOLT] Emit LSDA call sites for all fragments

For exception handling, LSDA call sites have to be emitted for each
fragment individually. With this patch, call sites and respective LSDA
symbols are generated and associated with each fragment of their
function, such that they can be used by the emitter.

Reviewed By: maksfb

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


  Commit: 579a5a47a91ccfa8ed96ca6c49d3510fca8d2326
      https://github.com/llvm/llvm-project/commit/579a5a47a91ccfa8ed96ca6c49d3510fca8d2326
  Author: Fabian Parzefall <parzefall at fb.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    A bolt/test/X86/split-all-lptrampoline.s

  Log Message:
  -----------
  [BOLT] Add test checking LP trampolines in multi-split

This adds a test to verify that when splitting all blocks, landing pad
trampolines are inserted in all blocks.

Reviewed By: maksfb

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


Compare: https://github.com/llvm/llvm-project/compare/d8c09b7bbc09...579a5a47a91c


More information about the All-commits mailing list