diff options
| author | Justin Bogner <mail@justinbogner.com> | 2014-04-17 22:49:06 +0000 |
|---|---|---|
| committer | Justin Bogner <mail@justinbogner.com> | 2014-04-17 22:49:06 +0000 |
| commit | 534f14abe7888bfb2588a3789b0c1e9f1f100ad0 (patch) | |
| tree | cecaf8064d1d6f44ae595f7519f02525169048a6 /clang/test/Profile | |
| parent | fd385407faf49d28c80bacb0934e5f0f0e224cac (diff) | |
| download | bcm5719-llvm-534f14abe7888bfb2588a3789b0c1e9f1f100ad0.tar.gz bcm5719-llvm-534f14abe7888bfb2588a3789b0c1e9f1f100ad0.zip | |
test: Use llvm-profdata merge in Profile tests
In preparation for using a binary format for instrumentation based
profiling, explicitly treat the test inputs as text and transform them
before running. This will allow us to leave the checked in files in
human readable format once the instrumentation format is binary.
No functional change.
llvm-svn: 206509
Diffstat (limited to 'clang/test/Profile')
| -rw-r--r-- | clang/test/Profile/Inputs/c-attributes.proftext (renamed from clang/test/Profile/Inputs/c-attributes.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/c-captured.proftext (renamed from clang/test/Profile/Inputs/c-captured.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/c-counter-overflows.proftext (renamed from clang/test/Profile/Inputs/c-counter-overflows.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/c-general.proftext (renamed from clang/test/Profile/Inputs/c-general.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/c-outdated-data.proftext (renamed from clang/test/Profile/Inputs/c-outdated-data.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/c-unprofiled-blocks.proftext (renamed from clang/test/Profile/Inputs/c-unprofiled-blocks.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/cxx-class.proftext (renamed from clang/test/Profile/Inputs/cxx-class.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/cxx-lambda.proftext (renamed from clang/test/Profile/Inputs/cxx-lambda.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/cxx-templates.proftext (renamed from clang/test/Profile/Inputs/cxx-templates.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/cxx-throws.proftext (renamed from clang/test/Profile/Inputs/cxx-throws.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/Inputs/objc-general.proftext (renamed from clang/test/Profile/Inputs/objc-general.profdata) | 0 | ||||
| -rw-r--r-- | clang/test/Profile/c-attributes.c | 3 | ||||
| -rw-r--r-- | clang/test/Profile/c-captured.c | 4 | ||||
| -rw-r--r-- | clang/test/Profile/c-counter-overflows.c | 3 | ||||
| -rw-r--r-- | clang/test/Profile/c-general.c | 4 | ||||
| -rw-r--r-- | clang/test/Profile/c-outdated-data.c | 3 | ||||
| -rw-r--r-- | clang/test/Profile/c-unprofiled-blocks.c | 3 | ||||
| -rw-r--r-- | clang/test/Profile/cxx-class.cpp | 3 | ||||
| -rw-r--r-- | clang/test/Profile/cxx-lambda.cpp | 3 | ||||
| -rw-r--r-- | clang/test/Profile/cxx-templates.cpp | 3 | ||||
| -rw-r--r-- | clang/test/Profile/cxx-throws.cpp | 5 | ||||
| -rw-r--r-- | clang/test/Profile/objc-general.m | 4 |
22 files changed, 26 insertions, 12 deletions
diff --git a/clang/test/Profile/Inputs/c-attributes.profdata b/clang/test/Profile/Inputs/c-attributes.proftext index e4d4694a8d9..e4d4694a8d9 100644 --- a/clang/test/Profile/Inputs/c-attributes.profdata +++ b/clang/test/Profile/Inputs/c-attributes.proftext diff --git a/clang/test/Profile/Inputs/c-captured.profdata b/clang/test/Profile/Inputs/c-captured.proftext index c1baefc894b..c1baefc894b 100644 --- a/clang/test/Profile/Inputs/c-captured.profdata +++ b/clang/test/Profile/Inputs/c-captured.proftext diff --git a/clang/test/Profile/Inputs/c-counter-overflows.profdata b/clang/test/Profile/Inputs/c-counter-overflows.proftext index 5a3633ecfc7..5a3633ecfc7 100644 --- a/clang/test/Profile/Inputs/c-counter-overflows.profdata +++ b/clang/test/Profile/Inputs/c-counter-overflows.proftext diff --git a/clang/test/Profile/Inputs/c-general.profdata b/clang/test/Profile/Inputs/c-general.proftext index 19e5bd3db44..19e5bd3db44 100644 --- a/clang/test/Profile/Inputs/c-general.profdata +++ b/clang/test/Profile/Inputs/c-general.proftext diff --git a/clang/test/Profile/Inputs/c-outdated-data.profdata b/clang/test/Profile/Inputs/c-outdated-data.proftext index d57a6e9d069..d57a6e9d069 100644 --- a/clang/test/Profile/Inputs/c-outdated-data.profdata +++ b/clang/test/Profile/Inputs/c-outdated-data.proftext diff --git a/clang/test/Profile/Inputs/c-unprofiled-blocks.profdata b/clang/test/Profile/Inputs/c-unprofiled-blocks.proftext index 87b48e13fbb..87b48e13fbb 100644 --- a/clang/test/Profile/Inputs/c-unprofiled-blocks.profdata +++ b/clang/test/Profile/Inputs/c-unprofiled-blocks.proftext diff --git a/clang/test/Profile/Inputs/cxx-class.profdata b/clang/test/Profile/Inputs/cxx-class.proftext index b4645edf933..b4645edf933 100644 --- a/clang/test/Profile/Inputs/cxx-class.profdata +++ b/clang/test/Profile/Inputs/cxx-class.proftext diff --git a/clang/test/Profile/Inputs/cxx-lambda.profdata b/clang/test/Profile/Inputs/cxx-lambda.proftext index 36646b5ab37..36646b5ab37 100644 --- a/clang/test/Profile/Inputs/cxx-lambda.profdata +++ b/clang/test/Profile/Inputs/cxx-lambda.proftext diff --git a/clang/test/Profile/Inputs/cxx-templates.profdata b/clang/test/Profile/Inputs/cxx-templates.proftext index 5ea840038d5..5ea840038d5 100644 --- a/clang/test/Profile/Inputs/cxx-templates.profdata +++ b/clang/test/Profile/Inputs/cxx-templates.proftext diff --git a/clang/test/Profile/Inputs/cxx-throws.profdata b/clang/test/Profile/Inputs/cxx-throws.proftext index 4016eca2ac8..4016eca2ac8 100644 --- a/clang/test/Profile/Inputs/cxx-throws.profdata +++ b/clang/test/Profile/Inputs/cxx-throws.proftext diff --git a/clang/test/Profile/Inputs/objc-general.profdata b/clang/test/Profile/Inputs/objc-general.proftext index 8d6771f9b32..8d6771f9b32 100644 --- a/clang/test/Profile/Inputs/objc-general.profdata +++ b/clang/test/Profile/Inputs/objc-general.proftext diff --git a/clang/test/Profile/c-attributes.c b/clang/test/Profile/c-attributes.c index 81809551fde..2dcc180624c 100644 --- a/clang/test/Profile/c-attributes.c +++ b/clang/test/Profile/c-attributes.c @@ -1,6 +1,7 @@ // Test that instrumentation based profiling sets function attributes correctly. -// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%S/Inputs/c-attributes.profdata | FileCheck %s +// RUN: llvm-profdata merge %S/Inputs/c-attributes.proftext -o %t.profdata +// RUN: %clang %s -o - -mllvm -disable-llvm-optzns -emit-llvm -S -fprofile-instr-use=%t.profdata | FileCheck %s extern int atoi(const char *); diff --git a/clang/test/Profile/c-captured.c b/clang/test/Profile/c-captured.c index a2678ec6283..47b1bbc7b76 100644 --- a/clang/test/Profile/c-captured.c +++ b/clang/test/Profile/c-captured.c @@ -1,5 +1,7 @@ // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN -check-prefix=PGOALL %s -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-use=%S/Inputs/c-captured.profdata | FileCheck -check-prefix=PGOUSE -check-prefix=PGOALL %s + +// RUN: llvm-profdata merge %S/Inputs/c-captured.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE -check-prefix=PGOALL %s // PGOGEN: @[[DCC:__llvm_profile_counters_debug_captured]] = global [3 x i64] zeroinitializer // PGOGEN: @[[CSC:__llvm_profile_counters___captured_stmt]] = internal global [2 x i64] zeroinitializer diff --git a/clang/test/Profile/c-counter-overflows.c b/clang/test/Profile/c-counter-overflows.c index 7cbe9bba869..f6f8f73fd94 100644 --- a/clang/test/Profile/c-counter-overflows.c +++ b/clang/test/Profile/c-counter-overflows.c @@ -1,7 +1,8 @@ // Test that big branch weights get scaled down to 32-bits, rather than just // truncated. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-counter-overflows.c %s -o - -emit-llvm -fprofile-instr-use=%S/Inputs/c-counter-overflows.profdata | FileCheck %s +// RUN: llvm-profdata merge %S/Inputs/c-counter-overflows.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-counter-overflows.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck %s typedef unsigned long long uint64_t; diff --git a/clang/test/Profile/c-general.c b/clang/test/Profile/c-general.c index 1359d287afa..21ba005894e 100644 --- a/clang/test/Profile/c-general.c +++ b/clang/test/Profile/c-general.c @@ -1,7 +1,9 @@ // Test instrumentation of general constructs in C. // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN %s -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instr-use=%S/Inputs/c-general.profdata | FileCheck -check-prefix=PGOUSE %s + +// RUN: llvm-profdata merge %S/Inputs/c-general.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s // PGOGEN: @[[SLC:__llvm_profile_counters_simple_loops]] = global [4 x i64] zeroinitializer // PGOGEN: @[[IFC:__llvm_profile_counters_conditionals]] = global [11 x i64] zeroinitializer diff --git a/clang/test/Profile/c-outdated-data.c b/clang/test/Profile/c-outdated-data.c index c241005b704..d0503acdb6e 100644 --- a/clang/test/Profile/c-outdated-data.c +++ b/clang/test/Profile/c-outdated-data.c @@ -3,7 +3,8 @@ // FIXME: It would be nice to use -verify here instead of FileCheck, but -verify // doesn't play well with warnings that have no line number. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-outdated-data.c %s -o /dev/null -emit-llvm -fprofile-instr-use=%S/Inputs/c-outdated-data.profdata -Wprofile-instr-dropped 2>&1 | FileCheck %s +// RUN: llvm-profdata merge %S/Inputs/c-outdated-data.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-outdated-data.c %s -o /dev/null -emit-llvm -fprofile-instr-use=%t.profdata -Wprofile-instr-dropped 2>&1 | FileCheck %s // CHECK: warning: profile data may be out of date: of 3 functions, 1 has no data and 1 has mismatched data that will be ignored void no_usable_data() { diff --git a/clang/test/Profile/c-unprofiled-blocks.c b/clang/test/Profile/c-unprofiled-blocks.c index 1f75a0da47f..58bef9e2962 100644 --- a/clang/test/Profile/c-unprofiled-blocks.c +++ b/clang/test/Profile/c-unprofiled-blocks.c @@ -1,7 +1,8 @@ // Blocks that we have no profile data for (ie, it was never reached in training // runs) shouldn't have any branch weight metadata added. -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instr-use=%S/Inputs/c-unprofiled-blocks.profdata | FileCheck -check-prefix=PGOUSE %s +// RUN: llvm-profdata merge %S/Inputs/c-unprofiled-blocks.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s // PGOUSE-LABEL: @never_called(i32 %i) int never_called(int i) { diff --git a/clang/test/Profile/cxx-class.cpp b/clang/test/Profile/cxx-class.cpp index 7cbbc096107..1a0c84bdcce 100644 --- a/clang/test/Profile/cxx-class.cpp +++ b/clang/test/Profile/cxx-class.cpp @@ -6,7 +6,8 @@ // RUN: FileCheck --input-file=%tgen -check-prefix=MTHGEN %s // RUN: FileCheck --input-file=%tgen -check-prefix=WRPGEN %s -// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/cxx-class.profdata -fno-exceptions -target %itanium_abi_triple > %tuse +// RUN: llvm-profdata merge %S/Inputs/cxx-class.proftext -o %t.profdata +// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -fno-exceptions -target %itanium_abi_triple > %tuse // RUN: FileCheck --input-file=%tuse -check-prefix=CTRUSE %s // RUN: FileCheck --input-file=%tuse -check-prefix=DTRUSE %s // RUN: FileCheck --input-file=%tuse -check-prefix=MTHUSE %s diff --git a/clang/test/Profile/cxx-lambda.cpp b/clang/test/Profile/cxx-lambda.cpp index fedb1019e76..923a432464c 100644 --- a/clang/test/Profile/cxx-lambda.cpp +++ b/clang/test/Profile/cxx-lambda.cpp @@ -4,7 +4,8 @@ // RUN: FileCheck --input-file=%tgen -check-prefix=PGOGEN %s // RUN: FileCheck --input-file=%tgen -check-prefix=LMBGEN %s -// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%S/Inputs/cxx-lambda.profdata > %tuse +// RUN: llvm-profdata merge %S/Inputs/cxx-lambda.proftext -o %t.profdata +// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%t.profdata > %tuse // RUN: FileCheck --input-file=%tuse -check-prefix=PGOUSE %s // RUN: FileCheck --input-file=%tuse -check-prefix=LMBUSE %s diff --git a/clang/test/Profile/cxx-templates.cpp b/clang/test/Profile/cxx-templates.cpp index d59f7b97c6b..5f99b999b8c 100644 --- a/clang/test/Profile/cxx-templates.cpp +++ b/clang/test/Profile/cxx-templates.cpp @@ -5,7 +5,8 @@ // RUN: FileCheck --input-file=%tgen -check-prefix=T0GEN -check-prefix=ALL %s // RUN: FileCheck --input-file=%tgen -check-prefix=T100GEN -check-prefix=ALL %s -// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%S/Inputs/cxx-templates.profdata > %tuse +// RUN: llvm-profdata merge %S/Inputs/cxx-templates.proftext -o %t.profdata +// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instr-use=%t.profdata > %tuse // RUN: FileCheck --input-file=%tuse -check-prefix=T0USE -check-prefix=ALL %s // RUN: FileCheck --input-file=%tuse -check-prefix=T100USE -check-prefix=ALL %s diff --git a/clang/test/Profile/cxx-throws.cpp b/clang/test/Profile/cxx-throws.cpp index cdcf53a14b0..e5017bc22be 100644 --- a/clang/test/Profile/cxx-throws.cpp +++ b/clang/test/Profile/cxx-throws.cpp @@ -6,8 +6,9 @@ // RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -target %itanium_abi_triple | FileCheck -check-prefix=PGOGEN %s // RUN: %clangxx %s -o - -emit-llvm -S -fprofile-instr-generate -target %itanium_abi_triple | FileCheck -check-prefix=PGOGEN-EXC %s -// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/cxx-throws.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s -// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%S/Inputs/cxx-throws.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s +// RUN: llvm-profdata merge %S/Inputs/cxx-throws.proftext -o %t.profdata +// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s +// RUN: %clang %s -o - -emit-llvm -S -fprofile-instr-use=%t.profdata -target %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s // PGOGEN: @[[THC:__llvm_profile_counters__Z6throwsv]] = global [9 x i64] zeroinitializer // PGOGEN-EXC: @[[THC:__llvm_profile_counters__Z6throwsv]] = global [9 x i64] zeroinitializer diff --git a/clang/test/Profile/objc-general.m b/clang/test/Profile/objc-general.m index 568e5e4182d..dc746189a82 100644 --- a/clang/test/Profile/objc-general.m +++ b/clang/test/Profile/objc-general.m @@ -1,7 +1,9 @@ // Test instrumentation of general constructs in objective C. // RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name objc-general.m %s -o - -emit-llvm -fblocks -fprofile-instr-generate | FileCheck -check-prefix=PGOGEN %s -// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name objc-general.m %s -o - -emit-llvm -fblocks -fprofile-instr-use=%S/Inputs/objc-general.profdata | FileCheck -check-prefix=PGOUSE %s + +// RUN: llvm-profdata merge %S/Inputs/objc-general.proftext -o %t.profdata +// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name objc-general.m %s -o - -emit-llvm -fblocks -fprofile-instr-use=%t.profdata | FileCheck -check-prefix=PGOUSE %s #ifdef HAVE_FOUNDATION |

