[all-commits] [llvm/llvm-project] 1cf259: [BOLT] Prevent adding secondary entry points for B...
Job Noorman via All-commits
all-commits at lists.llvm.org
Tue Sep 12 05:04:57 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1cf2599a64104f5b4b2ba5bdad1d961622669a3f
https://github.com/llvm/llvm-project/commit/1cf2599a64104f5b4b2ba5bdad1d961622669a3f
Author: Job Noorman <jnoorman at igalia.com>
Date: 2023-09-12 (Tue, 12 Sep 2023)
Changed paths:
M bolt/lib/Rewrite/RewriteInstance.cpp
A bolt/test/RISCV/branch-no-secondary-entry.s
Log Message:
-----------
[BOLT] Prevent adding secondary entry points for BB labels
When linker relaxation is enabled on RISC-V, every branch has a relocation and a
corresponding symbol in the symbol table. BOLT currently registers all these
symbols as secondary entry points causing almost every function to be marked as
multi entry on RISC-V.
This patch modifies `adjustFunctionBoundaries` to ignore these symbols.
Note that I currently try to detect them by checking if a symbol's name
starts with the private label prefix as defined by `MCAsmInfo`. Since
I'm not entirely sure what multi-entry functions look like on different
targets, please check if this condition is correct. Maybe it could make
sense to only check this on RISC-V?
Reviewed By: maksfb
Differential Revision: https://reviews.llvm.org/D159285
More information about the All-commits
mailing list