[all-commits] [llvm/llvm-project] 82095b: [BOLT] Mark fragments related to split jump table ...

Huan Nguyen via All-commits all-commits at lists.llvm.org
Fri Jun 10 15:49:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 82095bd5ed504fe26553b337d15131db530e768b
      https://github.com/llvm/llvm-project/commit/82095bd5ed504fe26553b337d15131db530e768b
  Author: Huan Nguyen <nhuhuan at yahoo.com>
  Date:   2022-06-10 (Fri, 10 Jun 2022)

  Changed paths:
    M bolt/lib/Core/BinaryContext.cpp
    M bolt/lib/Rewrite/RewriteInstance.cpp
    M bolt/test/X86/split-func-icf.s

  Log Message:
  -----------
  [BOLT] Mark fragments related to split jump table as non-simple

Mark fragments related to split jump table as non-simple.

A function could be splitted into hot and cold fragments. A split jump table is
challenging for correctly reconstructing control flow graphs, so it was marked
as ignored. This update marks those fragments as non-simple, allowing them
to be printed and partial control flow graph construction.

Test Plan:
```
llvm-lit -a tools/bolt/test/X86/split-func-icf.s
```
This test has two functions (main, main2), each has a jump table target to the
same cold portion main2.cold.1(*2). We try to print out only this cold portion.
If it is ignored, it cannot be printed. If it is non-simple, it can be printed. We
verify that it can be printed.

Reviewed By: Amir

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




More information about the All-commits mailing list