diff options
author | Dehao Chen <dehao@google.com> | 2017-06-29 23:33:13 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-06-29 23:33:13 +0000 |
commit | db18c6fcf7ad7b5e05104070b78e61fcc1db4bd9 (patch) | |
tree | 5c291739a1a7416cadb515d27e51191dcca04826 /test/CodeGen | |
parent | 9f28442d72ed8db4ce56d163e9ea2355cf7cb4ae (diff) |
[PM] Add support for sample PGO in the new pass manager (clang-side)
Summary: This implements the clang bits of https://reviews.llvm.org/D34720, and add corresponding test to verify if it worked.
Reviewers: chandlerc, davidxl, davide, tejohnson
Reviewed By: chandlerc, tejohnson
Subscribers: tejohnson, sanjoy, mehdi_amini, eraman, cfe-commits
Differential Revision: https://reviews.llvm.org/D34721
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306764 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/pgo-sample-thinlto-summary.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/CodeGen/pgo-sample-thinlto-summary.c b/test/CodeGen/pgo-sample-thinlto-summary.c index d64de536e1..51c8faa6be 100644 --- a/test/CodeGen/pgo-sample-thinlto-summary.c +++ b/test/CodeGen/pgo-sample-thinlto-summary.c @@ -1,5 +1,9 @@ // RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO // RUN: %clang_cc1 -O2 -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO +// RUN: %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -o - 2>&1 | FileCheck %s -check-prefix=SAMPLEPGO +// FIXME: Run the following command once LTOPreLinkDefaultPipeline is +// customized. +// %clang_cc1 -O2 -fexperimental-new-pass-manager -fprofile-sample-use=%S/Inputs/pgo-sample-thinlto-summary.prof %s -emit-llvm -flto=thin -o - 2>&1 | FileCheck %s -check-prefix=THINLTO // Checks if hot call is inlined by normal compile, but not inlined by // thinlto compile. @@ -36,7 +40,9 @@ void unroll() { // SAMPLEPGO-LABEL: define void @icp // THINLTO-LABEL: define void @icp // SAMPLEPGO: if.true.direct_targ -// ThinLTO-NOT: if.true.direct_targ +// FIXME: the following condition needs to be reversed once +// LTOPreLinkDefaultPipeline is customized. +// THINLTO-NOT: if.true.direct_targ void icp(void (*p)()) { p(); } |