[PATCH] D129107: [BOLT][HUGIFY] adds huge pages support of PIE/no-PIE binaries

Rafael Auler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 16:17:44 PDT 2022


rafauler added a comment.

Thanks!



================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:494-496
+  // Hugify: Additional huge page from left side
+  if (opts::Hugify)
+    NextAvailableAddress += BC->PageAlign;
----------------
Why is that needed?


================
Comment at: bolt/lib/Rewrite/RewriteInstance.cpp:3626-3628
+        // Hugify: Additional huge page from right side
+        if (opts::Hugify)
+          Address = alignTo(Address, Section->getAlignment());
----------------
Same


================
Comment at: bolt/runtime/common.h:82
 extern "C" {
-void *memcpy(void *Dest, const void *Src, size_t Len) {
+void __attribute__((noinline)) *
+    memcpy(void *Dest, const void *Src, size_t Len) {
----------------
Why is that needed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129107/new/

https://reviews.llvm.org/D129107



More information about the llvm-commits mailing list