aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCUDA.cpp
diff options
context:
space:
mode:
authorHuan Nguyen <nhuhuan@yahoo.com>2022-07-13 23:35:51 -0700
committerHuan Nguyen <nhuhuan@yahoo.com>2022-07-13 23:37:31 -0700
commit05523dc32d8ca81d9a92ff955194a9e80cf79dc0 (patch)
tree4a85fa6f39547c05193f1e44b66c3e9f2a72e14d /clang/lib/Sema/SemaCUDA.cpp
parent611ffcf4e4a2ab19063174f6990969f96e9078de (diff)
downloadllvm-05523dc32d8ca81d9a92ff955194a9e80cf79dc0.zip
llvm-05523dc32d8ca81d9a92ff955194a9e80cf79dc0.tar.gz
llvm-05523dc32d8ca81d9a92ff955194a9e80cf79dc0.tar.bz2
[BOLT] Support multiple parents for split jump table
There are two assumptions regarding jump table: (a) It is accessed by only one fragment, say, Parent (b) All entries target instructions in Parent For (a), BOLT stores jump table entries as relative offset to Parent. For (b), BOLT treats jump table entries target somewhere out of Parent as INVALID_OFFSET, including fragment of same split function. In this update, we extend (a) and (b) to include fragment of same split functinon. For (a), we store jump table entries in absolute offset instead. In addition, jump table will store all fragments that access it. A fragment uses this information to only create label for jump table entries that target to that fragment. For (b), using absolute offset allows jump table entries to target fragments of same split function, i.e., extend support for split jump table. This can be done using relocation (fragment start/size) and fragment detection heuristics (e.g., using symbol name pattern for non-stripped binaries). For jump table targets that can only be reached by one fragment, we mark them as local label; otherwise, they would be the secondary function entry to the target fragment. Test Plan ``` ninja check-bolt ``` Reviewed By: Amir Differential Revision: https://reviews.llvm.org/D128474
Diffstat (limited to 'clang/lib/Sema/SemaCUDA.cpp')
0 files changed, 0 insertions, 0 deletions