diff options
author | Maksim Panchenko <maks@fb.com> | 2025-05-08 10:53:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-08 10:53:47 -0700 |
commit | 254c13d872ea378f9e5569060e24c134d37a0ecb (patch) | |
tree | ea2dc058296e5405e772fdd65668a01ae63b7da8 /bolt/lib/Utils/CommandLineOpts.cpp | |
parent | b836f96b8f51daa76f6387de364603db0fe553a7 (diff) | |
download | llvm-254c13d872ea378f9e5569060e24c134d37a0ecb.zip llvm-254c13d872ea378f9e5569060e24c134d37a0ecb.tar.gz llvm-254c13d872ea378f9e5569060e24c134d37a0ecb.tar.bz2 |
[BOLT][AArch64] Patch functions targeted by optional relocs (#138750)
On AArch64, we create optional/weak relocations that may not be
processed due to the relocated value overflow. When the overflow
happens, we used to enforce patching for all functions in the binary via
--force-patch option. This PR relaxes the requirement, and enforces
patching only for functions that are target of optional relocations.
Moreover, if the compact code model is used, the relocation overflow is
guaranteed not to happen and the patching will be skipped.
Diffstat (limited to 'bolt/lib/Utils/CommandLineOpts.cpp')
-rw-r--r-- | bolt/lib/Utils/CommandLineOpts.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bolt/lib/Utils/CommandLineOpts.cpp b/bolt/lib/Utils/CommandLineOpts.cpp index ad71437..2d1d697 100644 --- a/bolt/lib/Utils/CommandLineOpts.cpp +++ b/bolt/lib/Utils/CommandLineOpts.cpp @@ -62,6 +62,11 @@ cl::opt<unsigned> cl::init(256), cl::Optional, cl::cat(HeatmapCategory)); cl::opt<bool> + CompactCodeModel("compact-code-model", + cl::desc("generate code for binaries <128MB on AArch64"), + cl::init(false), cl::cat(BoltCategory)); + +cl::opt<bool> DiffOnly("diff-only", cl::desc("stop processing once we have enough to compare two binaries"), cl::Hidden, |