Skip to content

Commit

Permalink
[AIX][PGO] Enable some profile-rt tests now that -fprofile-instr-gene…
Browse files Browse the repository at this point in the history
…rate works on AIX
  • Loading branch information
Wael Yehia committed Oct 16, 2024
1 parent 9255850 commit 92ad039
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions compiler-rt/test/profile/Posix/instrprof-visibility.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// RUN: %clangxx_profgen -fcoverage-mapping %S/Inputs/instrprof-visibility-helper.cpp -o %t %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata merge %t.profraw -o %t.profdata
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/coverage-inline.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// Test that the instrumentation puts the right linkage on the profile data for
// inline functions.
// RUN: %clang_profgen -g -fcoverage-mapping -c -o %t1.o %s -DOBJECT_1
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/coverage_comments.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// RUN: %clangxx_profgen -fcoverage-mapping -Wno-comment -o %t %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/coverage_emptylines.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// Remove comments first.
// RUN: sed 's/[ \t]*\/\/.*//' %s > %t.stripped.cpp
// RUN: %clangxx_profgen -fcoverage-mapping -o %t %t.stripped.cpp
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/instrprof-merging.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// UNSUPPORTED: target={{.*windows.*}}
// XFAIL: target={{.*}}-aix{{.*}}
// 1) Compile shared code into different object files and into an executable.

// RUN: %clangxx_profgen -std=c++14 -fcoverage-mapping %s -c -o %t.v1.o \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ int main(int argc, const char *argv[]) {

return 0;
}
// XFAIL: target={{.*}}-aix{{.*}}
// CHECK: 10| |#include <stdio.h>
// CHECK: 11| |
// CHECK: 12| |extern void __llvm_profile_set_file_object(FILE *, int);
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/instrprof-set-file-object.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ int main(int argc, const char *argv[]) {
__llvm_profile_set_file_object(F, 0);
return 0;
}
// XFAIL: target={{.*}}-aix{{.*}}
// CHECK: 8| |#include <stdio.h>
// CHECK: 9| |
// CHECK: 10| |extern void __llvm_profile_set_file_object(FILE *, int);
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/instrprof-without-libc.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// RUN: %clang_profgen -DCHECK_SYMBOLS -O3 -o %t.symbols %s
// RUN: llvm-nm %t.symbols | FileCheck %s --check-prefix=CHECK-SYMBOLS
// RUN: %clang_profgen -O3 -o %t %s
Expand Down
1 change: 1 addition & 0 deletions compiler-rt/test/profile/instrprof-write-file-only.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// XFAIL: target={{.*}}-aix{{.*}}
// RUN: %clang_profgen -o %t -O3 %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata merge -o %t.profdata %t.profraw
Expand Down
8 changes: 2 additions & 6 deletions compiler-rt/test/profile/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,8 @@ def exclude_unsupported_files_for_aix(dirname):
f = open(source_path, "r")
try:
data = f.read()
# -fprofile-instr-generate and rpath are not supported on AIX, exclude all tests with them.
if (
"%clang_profgen" in data
or "%clangxx_profgen" in data
or "-rpath" in data
):
# rpath is not supported on AIX, exclude all tests with them.
if ( "-rpath" in data ):
config.excludes += [filename]
finally:
f.close()
Expand Down

0 comments on commit 92ad039

Please sign in to comment.