[llvm] [BOLT] hugify: fix conflict with --no-huge-pages (PR #205497)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 04:09:55 PDT 2026


================
@@ -158,7 +158,16 @@ BinaryContext::BinaryContext(std::unique_ptr<MCContext> Ctx,
       MIA(std::move(MIA)), MIB(std::move(MIB)), MRI(std::move(MRI)),
       DisAsm(std::move(DisAsm)), Logger(Logger), InitialDynoStats(isAArch64()) {
   RegularPageSize = isAArch64() ? RegularPageSizeAArch64 : RegularPageSizeX86;
-  PageAlign = opts::NoHugePages ? RegularPageSize : HugePageSize;
+  if (opts::Hugify) {
+    PageAlign = HugePageSize;
+    if (opts::NoHugePages) {
+      this->errs() << "BOLT-WARNING: a conflict between --hugify and "
----------------
paschalis-mpeis wrote:

Thanks Dmitrii, looks good to me. @aaupor, do we prefer handling like this to go into `adjustCommandLineOptions` instead?

https://github.com/llvm/llvm-project/pull/205497


More information about the llvm-commits mailing list