[llvm] [BOLT][NFC] Set minimal alignment for BF (PR #67707)
Vladislav Khmelevsky via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 28 10:11:17 PDT 2023
================
@@ -158,21 +158,13 @@ void AlignerPass::runOnFunctions(BinaryContext &BC) {
BinaryContext::IndependentCodeEmitter Emitter =
BC.createIndependentMCCodeEmitter();
- // Align objects that contains constant islands and no code
- // to at least 8 bytes.
- if (!BF.size() && BF.hasIslandsInfo()) {
- uint16_t Alignment = BF.getConstantIslandAlignment();
- // Check if we're forcing output alignment and it is greater than minimal
- // CI required one
- if (!opts::UseCompactAligner && Alignment < opts::AlignFunctions &&
- opts::AlignFunctions <= opts::AlignFunctionsMaxBytes)
- Alignment = opts::AlignFunctions;
-
- BF.setAlignment(Alignment);
- BF.setMaxAlignmentBytes(Alignment);
- BF.setMaxColdAlignmentBytes(Alignment);
- return;
- }
+ // Minimal code alignment on AArch64 is 4
+ if (BC.isAArch64())
----------------
yota9 wrote:
Probably need to add isRISCV check here too @mtvec ?
https://github.com/llvm/llvm-project/pull/67707
More information about the llvm-commits
mailing list