Skip to content

Commit 68cd8a2

Browse files
committed
Clean up a few tests using clang_lto_profgen
(1) clang_lto_profgen will add `-flto` (or `-flto=thin`) when `lto_supported`: - https://github.com/llvm/llvm-project/blob/ec36145f58d2cf93d86bc4e3be617ad7d7d8ace7/compiler-rt/test/profile/lit.cfg.py#L67 - https://github.com/llvm/llvm-project/blob/f0b3654701bde1cf7821d60698b42383edaff9f3/compiler-rt/test/lit.common.cfg.py#L775 so we may not need to add `-flto` explicitly (otherwise there is some confusing about which is used) (2) two tests use `clang_lto_profgen`, but only one requires `lto`. It seems like both should require `lto` since it intends to test `clang_lto_profgen`. Item (2) may partially help with llvm#90692 (comment) At the moment, some bots see LLD, but is using an old copy of LLD which will break if we increase the `ModuleSummaryIndex::BitCodeSummaryVersion` since the old copy of LLD does not understand the new version.
1 parent f0b3654 commit 68cd8a2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler-rt/test/profile/instrprof-darwin-dead-strip.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// RUN: otool -V -s __DATA __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES
1111
// RUN: otool -V -s __DATA __llvm_prf_cnts %t | FileCheck %s -check-prefix=PRF_CNTS
1212

13-
// RUN: %clang_lto_profgen=%t.lto.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -flto -o %t.lto %s
13+
// RUN: %clang_lto_profgen=%t.lto.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -o %t.lto %s
1414
// RUN: %run %t.lto
1515
// RUN: llvm-profdata merge -o %t.lto.profdata %t.lto.profraw
1616
// RUN: llvm-profdata show --all-functions %t.lto.profdata | FileCheck %s -check-prefix=PROF

compiler-rt/test/profile/instrprof-gc-sections.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// REQUIRES: linux, lld-available
1+
// REQUIRES: linux, lld-available, lto
22

33
// FIXME: Investigate and fix.
44
// XFAIL: powerpc64-target-arch
@@ -14,7 +14,7 @@
1414
// RUN: llvm-size -A %t | FileCheck %s -check-prefix=PRF_CNTS
1515

1616
// RUN: rm -rf %t.lto.profraw
17-
// RUN: %clang_lto_profgen=%t.lto.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -flto -o %t.lto %s
17+
// RUN: %clang_lto_profgen=%t.lto.profraw -fuse-ld=lld -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -ffunction-sections -fdata-sections -Wl,--gc-sections -o %t.lto %s
1818
// RUN: %run %t.lto
1919
// RUN: llvm-profdata merge -o %t.lto.profdata %t.lto.profraw
2020
// RUN: llvm-profdata show --all-functions %t.lto.profdata | FileCheck %s -check-prefix=PROF

0 commit comments

Comments
 (0)