-
Notifications
You must be signed in to change notification settings - Fork 14.2k
[InstrProf][lld] Extend test to confirm order_file takes precedense over BP #118889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-lld @llvm/pr-subscribers-lld-macho Author: Ellis Hoag (ellishg) ChangesWhen both Full diff: https://github.com/llvm/llvm-project/pull/118889.diff 1 Files Affected:
diff --git a/lld/test/MachO/bp-section-orderer.s b/lld/test/MachO/bp-section-orderer.s
index 407787025150d2..f220a08aff0f80 100644
--- a/lld/test/MachO/bp-section-orderer.s
+++ b/lld/test/MachO/bp-section-orderer.s
@@ -9,8 +9,11 @@
# STARTUP: Ordered 3 sections using balanced partitioning
-# RUN: %lld -arch arm64 -lSystem -e _main -o - %t/a.o --irpgo-profile-sort=%t/a.profdata -order_file %t/a.orderfile | llvm-nm --numeric-sort --format=just-symbols - | FileCheck %s --check-prefix=ORDERFILE
+# Check that orderfiles take precedence over BP
+# RUN: %lld -arch arm64 -lSystem -e _main -o - %t/a.o -order_file %t/a.orderfile --irpgo-profile-sort=%t/a.profdata | llvm-nm --numeric-sort --format=just-symbols - | FileCheck %s --check-prefix=ORDERFILE
+# RUN: %lld -arch arm64 -lSystem -e _main -o - %t/a.o -order_file %t/a.orderfile --compression-sort=both | llvm-nm --numeric-sort --format=just-symbols - | FileCheck %s --check-prefix=ORDERFILE
+# Functions
# ORDERFILE: A
# ORDERFILE: F
# ORDERFILE: E
@@ -18,10 +21,15 @@
# ORDERFILE-DAG: _main
# ORDERFILE-DAG: _B
# ORDERFILE-DAG: l_C
+
+# Data
+# ORDERFILE: s3
+# ORDERFILE: r3
+# ORDERFILE: r2
# ORDERFILE-DAG: s1
# ORDERFILE-DAG: s2
# ORDERFILE-DAG: r1
-# ORDERFILE-DAG: r2
+# ORDERFILE-DAG: r4
# RUN: %lld -arch arm64 -lSystem -e _main -o %t/a.out %t/a.o --verbose-bp-section-orderer --compression-sort=function 2>&1 | FileCheck %s --check-prefix=COMPRESSION-FUNC
# RUN: %lld -arch arm64 -lSystem -e _main -o %t/a.out %t/a.o --verbose-bp-section-orderer --compression-sort=data 2>&1 | FileCheck %s --check-prefix=COMPRESSION-DATA
@@ -29,8 +37,8 @@
# RUN: %lld -arch arm64 -lSystem -e _main -o %t/a.out %t/a.o --verbose-bp-section-orderer --compression-sort=both --irpgo-profile-sort=%t/a.profdata 2>&1 | FileCheck %s --check-prefix=COMPRESSION-BOTH
# COMPRESSION-FUNC: Ordered 7 sections using balanced partitioning
-# COMPRESSION-DATA: Ordered 4 sections using balanced partitioning
-# COMPRESSION-BOTH: Ordered 11 sections using balanced partitioning
+# COMPRESSION-DATA: Ordered 7 sections using balanced partitioning
+# COMPRESSION-BOTH: Ordered 14 sections using balanced partitioning
#--- a.s
.text
@@ -66,10 +74,16 @@ s1:
.ascii "hello world"
s2:
.ascii "i am a string"
+s3:
+ .ascii "this is s3"
r1:
.quad s1
r2:
.quad r1
+r3:
+ .quad r2
+r4:
+ .quad s2
.subsections_via_symbols
@@ -121,3 +135,6 @@ A
F
E
D
+s3
+r3
+r2
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/190/builds/10803 Here is the relevant piece of the build log for the reference
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/3/builds/8722 Here is the relevant piece of the build log for the reference
|
When both
-order_file
and--irpgo-profile-sort=
(soon to be-bp-startup-sort=function
in #118594) are used, we want to confirm that symbols in the orderfile take precedence.