[PATCH] D127464: [BOLT] Mark fragments related to split jump table as non-simple

Huan Nguyen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 10 13:49:21 PDT 2022


nhuhuan added a comment.

In D127464#3574478 <https://reviews.llvm.org/D127464#3574478>, @Amir wrote:

> Please address test crashes: https://buildkite.com/llvm-project/premerge-checks/builds/97009#01814b67-0bb2-48c7-b45e-ed4f32025c12/494-3664

Fixed.
The assertion guarantees that non-simple functions are either an empty function or has no relocation, which is not the case for split jump table.
We propagate hasSplitJumpTable to all fragments that can reach or be reached by the fragment with split jump table. Then we use this property to make an exception for the assertion.

Example:

FragmentA:
// has split jump table target FragmentA.cold
FragmentB:
// has direct jump to FragmentA.cold
FragmentA.cold.1:
// some code

Initially, the property HasSplitJumpTable of FragmentA is set to true.
Propagate to FragmentA.cold.1, so the property of FragmentA.cold.1 is also set to true.
FragmentB, despite not having split jump table, is also set to true because it reaches the non-simple fragment FragmentA.cold.1.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127464/new/

https://reviews.llvm.org/D127464



More information about the llvm-commits mailing list