diff options
author | Anatoly Trosinenko <atrosinenko@accesssoftek.com> | 2024-07-05 13:12:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 13:12:09 +0300 |
commit | cc53b953acebfe47504bfd1af1f71b5906a974bf (patch) | |
tree | 1419b5026f0d3c32b3d76f0ff086659413409558 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 6fbd26b147ab93da4d0689ea2f6ff73cc9859cb8 (diff) | |
download | llvm-cc53b953acebfe47504bfd1af1f71b5906a974bf.zip llvm-cc53b953acebfe47504bfd1af1f71b5906a974bf.tar.gz llvm-cc53b953acebfe47504bfd1af1f71b5906a974bf.tar.bz2 |
[AArch64] When hardening against SLS, only create called thunks (#97472)
In preparation for implementing hardening of BLRA* instructions,
restrict thunk function generation to only the thunks being actually
called from any function. As described in the existing comments,
emitting all possible thunks for BLRAA and BLRAB instructions would mean
adding about 1800 functions in total, most of which are likely not to be
called.
This commit merges AArch64SLSHardening class into SLSBLRThunkInserter,
so thunks can be created as needed while rewriting a machine function.
The usages of TII, TRI and ST fields of AArch64SLSHardening class are
replaced with requesting them in-place, as ThunkInserter assumes
multiple "entry points" in contrast to the only runOnMachineFunction
method of AArch64SLSHardening.
The runOnMachineFunction method essentially replaces pre-existing
insertThunks implementation as there is no more need to insert all
possible thunks unconditionally. Instead, thunks are created on first
use from inside of insertThunks method.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions