[llvm] [AArch64][BOLT] Ensure tentative code layout for cold BBs runs. (PR #96609)
Vladislav Khmelevsky via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 03:32:21 PDT 2024
================
@@ -0,0 +1,14 @@
+// This test checks that tentative code layout for cold basic blocks runs
+// at least once, even when each function after the hot/cold frontier is not
+// emittable. This is done by ignoring each function using the 'skip-funcs' flag.
+// In a realistic scenario, this may happen when lite mode is enabled along
+// with a bolt profile.
+
+REQUIRES: system-linux
+
+RUN: %clang %cflags %p/../Inputs/asm_main.c -Wl,-q -o %t
+
+RUN: llvm-bolt %t -o %t.bolt -lite=1 -split-functions -split-all-cold \
+RUN: --skip-funcs="_init,_start,call_weak_fn/1,deregister_tm_clones/1,register_tm_clones/1,__do_global_dtors_aux/1,frame_dummy/1,main,foo,_fini" 2>&1 | FileCheck %s
----------------
yota9 wrote:
Since we're using nostdlib flag most of these symbols won't appear in the binary except foo and main.
https://github.com/llvm/llvm-project/pull/96609
More information about the llvm-commits
mailing list