summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-07-26 02:00:43 +0000
committerDehao Chen <dehao@google.com>2017-07-26 02:00:43 +0000
commit7b05a2712a673fe7032189a142f299ded3885491 (patch)
tree0bc4774c723f8b85eac86199c7797c1256777bb6 /llvm/test
parent557a0b3a9eb727bdedb2b6ebf0908ae311330092 (diff)
downloadbcm5719-llvm-7b05a2712a673fe7032189a142f299ded3885491.tar.gz
bcm5719-llvm-7b05a2712a673fe7032189a142f299ded3885491.zip
Add test coverage for new PM PGOOpt handling.
Summary: This patch adds flags and tests to cover the PGOOpt handling logic in new PM. Reviewers: chandlerc, davide Reviewed By: chandlerc Subscribers: sanjoy, llvm-commits Differential Revision: https://reviews.llvm.org/D35807 llvm-svn: 309076
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/Other/Inputs/new-pm-pgo.prof1
-rw-r--r--llvm/test/Other/Inputs/new-pm-pgo.proftext1
-rw-r--r--llvm/test/Other/new-pm-pgo.ll12
3 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Other/Inputs/new-pm-pgo.prof b/llvm/test/Other/Inputs/new-pm-pgo.prof
new file mode 100644
index 00000000000..4642cb92648
--- /dev/null
+++ b/llvm/test/Other/Inputs/new-pm-pgo.prof
@@ -0,0 +1 @@
+foo:0:0
diff --git a/llvm/test/Other/Inputs/new-pm-pgo.proftext b/llvm/test/Other/Inputs/new-pm-pgo.proftext
new file mode 100644
index 00000000000..04a7c1c1a35
--- /dev/null
+++ b/llvm/test/Other/Inputs/new-pm-pgo.proftext
@@ -0,0 +1 @@
+:ir
diff --git a/llvm/test/Other/new-pm-pgo.ll b/llvm/test/Other/new-pm-pgo.ll
new file mode 100644
index 00000000000..2388019c104
--- /dev/null
+++ b/llvm/test/Other/new-pm-pgo.ll
@@ -0,0 +1,12 @@
+; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=new-pm-pgo-instr-gen-pipeline -profile-file='temp' %s 2>&1 |FileCheck %s --check-prefixes=GEN
+; RUN: llvm-profdata merge %S/Inputs/new-pm-pgo.proftext -o %t.profdata
+; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=new-pm-pgo-instr-use-pipeline -profile-file='%t.profdata' %s 2>&1 |FileCheck %s --check-prefixes=USE
+; RUN: opt -debug-pass-manager -passes='default<O2>' -pgo-kind=new-pm-pgo-sample-use-pipeline -profile-file='%S/Inputs/new-pm-pgo.prof' %s 2>&1 |FileCheck %s --check-prefixes=SAMPLE_USE
+;
+; GEN: Running pass: PGOInstrumentationGen
+; USE: Running pass: PGOInstrumentationUse
+; SAMPLE_USE: Running pass: SampleProfileLoaderPass
+
+define void @foo() {
+ ret void
+}
OpenPOWER on IntegriCloud