diff options
author | Maksim Panchenko <maks@fb.com> | 2024-06-27 19:26:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-27 19:26:11 -0700 |
commit | d16b21b17d13ecd88a068bb803df43e53d3b04ba (patch) | |
tree | 8e25788471dba99b1fd8f873dbadd66cc595e062 /llvm/lib/CodeGen/BranchFolding.cpp | |
parent | 7423bf78eb53d81ce0c7b3a38e39a56341ca2a89 (diff) | |
download | llvm-d16b21b17d13ecd88a068bb803df43e53d3b04ba.zip llvm-d16b21b17d13ecd88a068bb803df43e53d3b04ba.tar.gz llvm-d16b21b17d13ecd88a068bb803df43e53d3b04ba.tar.bz2 |
[BOLT][Linux] Support ORC for alternative instructions (#96709)
Alternative instruction sequences in the Linux kernel can modify the
stack and thus they need their own ORC unwind entries. Since there's
only one ORC table, it has to be "shared" among multiple instruction
sequences. The kernel achieves this by putting a restriction on
instruction boundaries. If ORC state changes at a given IP, only one of
the alternative sequences can have an instruction starting/ending at
this IP. Then, developers can insert NOPs to guarantee the above
requirement is met.
The most common use of ORC with alternatives is "pushf; pop %rax"
sequence used for paravirtualization. Note that newer kernel versions
no longer use .parainstructions; instead, they utilize alternatives for
the same purpose.
Before we implement a better support for alternatives, we can safely
skip ORC entries associated with them.
Fixes #87052.
Diffstat (limited to 'llvm/lib/CodeGen/BranchFolding.cpp')
0 files changed, 0 insertions, 0 deletions