summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-07-07 22:40:37 +0000
committerDehao Chen <dehao@google.com>2017-07-07 22:40:37 +0000
commitf856dbdb029709b9e85d62082da76dfcdce452c8 (patch)
treecfa8d02dcae1e92f7d2542f6a23ebd2c2bceb36e
parent5c2e3e2b75f083eeb67fb7ad45207443d30965ee (diff)
downloadbcm5719-llvm-f856dbdb029709b9e85d62082da76dfcdce452c8.tar.gz
bcm5719-llvm-f856dbdb029709b9e85d62082da76dfcdce452c8.zip
Revert r307445 as it breaks on certain platforms.
llvm-svn: 307449
-rw-r--r--clang/test/CodeGen/Inputs/pgo-sample.prof9
-rw-r--r--clang/test/CodeGen/pgo-sample.c36
2 files changed, 6 insertions, 39 deletions
diff --git a/clang/test/CodeGen/Inputs/pgo-sample.prof b/clang/test/CodeGen/Inputs/pgo-sample.prof
index 16fde768c29..c5b8d9ef1a8 100644
--- a/clang/test/CodeGen/Inputs/pgo-sample.prof
+++ b/clang/test/CodeGen/Inputs/pgo-sample.prof
@@ -1,7 +1,2 @@
-bar:1000:1000
- 1: 1000
- 2: 0
-foo:1000:1000
- 1:bar:1000
- 1: 1000
- 2: 1000
+bar:100:100
+ 1: 2000
diff --git a/clang/test/CodeGen/pgo-sample.c b/clang/test/CodeGen/pgo-sample.c
index c6ba1085614..e7d2fa61aa1 100644
--- a/clang/test/CodeGen/pgo-sample.c
+++ b/clang/test/CodeGen/pgo-sample.c
@@ -1,34 +1,6 @@
// Test if PGO sample use passes are invoked.
//
-// Ensure Pass SampleProfileLoader is invoked.
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s --check-prefix=STRUCTURE
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -mllvm -inline-threshold=0 -emit-llvm -o - 2>&1 | FileCheck %s
-// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -mllvm -inline-threshold=0 -emit-llvm -fexperimental-new-pass-manager -o - 2>&1 | FileCheck %s
-// STRUCTURE: Remove unused exception handling info
-// STRUCTURE: Sample profile pass
-
-void baz();
-
-// CHECK-LABEL: @callee(
-void callee(int t) {
- for (int i = 0; i < t; i++)
- baz();
-}
-
-// CHECK-LABEL: @bar(
-// cold call to callee should not be inlined.
-// CHECK: call void @callee
-void bar(int x) {
- if (x < 100)
- callee(x);
-}
-
-// CHECK-LABEL: @foo(
-// bar should be early-inlined because it is hot inline instance in profile.
-// callee should be inlined because it is hot callsite in the inline instance
-// of foo:bar.
-// CHECK-NOT: call void @callee
-// CHECK-NOT: call void @bar
-void foo(int x) {
- bar(x);
-}
+// Ensure Pass PGOInstrumentationGenPass is invoked.
+// RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample.prof %s -mllvm -debug-pass=Structure -emit-llvm -o - 2>&1 | FileCheck %s
+// CHECK: Remove unused exception handling info
+// CHECK: Sample profile pass
OpenPOWER on IntegriCloud