[PATCH] D121298: [BOLT] LongJmp: Use per-function alignment values
Vladislav Khmelevsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 10 08:50:56 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG04b87cf0e79d: [BOLT] LongJmp: Use per-function alignment values (authored by yota9).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121298/new/
https://reviews.llvm.org/D121298
Files:
bolt/lib/Passes/LongJmp.cpp
Index: bolt/lib/Passes/LongJmp.cpp
===================================================================
--- bolt/lib/Passes/LongJmp.cpp
+++ bolt/lib/Passes/LongJmp.cpp
@@ -21,8 +21,6 @@
extern cl::OptionCategory BoltOptCategory;
extern cl::opt<bool> UseOldText;
-extern cl::opt<unsigned> AlignFunctions;
-extern cl::opt<unsigned> AlignFunctionsMaxBytes;
extern cl::opt<bool> HotFunctionsAtEnd;
static cl::opt<bool>
@@ -302,8 +300,8 @@
continue;
DotAddress = alignTo(DotAddress, BinaryFunction::MinAlign);
uint64_t Pad =
- offsetToAlignment(DotAddress, llvm::Align(opts::AlignFunctions));
- if (Pad <= opts::AlignFunctionsMaxBytes)
+ offsetToAlignment(DotAddress, llvm::Align(Func->getAlignment()));
+ if (Pad <= Func->getMaxColdAlignmentBytes())
DotAddress += Pad;
ColdAddresses[Func] = DotAddress;
LLVM_DEBUG(dbgs() << Func->getPrintName() << " cold tentative: "
@@ -349,8 +347,8 @@
DotAddress = alignTo(DotAddress, BinaryFunction::MinAlign);
uint64_t Pad =
- offsetToAlignment(DotAddress, llvm::Align(opts::AlignFunctions));
- if (Pad <= opts::AlignFunctionsMaxBytes)
+ offsetToAlignment(DotAddress, llvm::Align(Func->getAlignment()));
+ if (Pad <= Func->getMaxAlignmentBytes())
DotAddress += Pad;
HotAddresses[Func] = DotAddress;
LLVM_DEBUG(dbgs() << Func->getPrintName() << " tentative: "
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121298.414394.patch
Type: text/x-patch
Size: 1403 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220310/8f7f4d05/attachment.bin>
More information about the llvm-commits
mailing list