diff options
author | Dehao Chen <dehao@google.com> | 2017-08-24 21:37:33 +0000 |
---|---|---|
committer | Dehao Chen <dehao@google.com> | 2017-08-24 21:37:33 +0000 |
commit | 5e97f2344122a287350516067c84dc13f9d71726 (patch) | |
tree | 8a66a408a34273f1e203b977422fb21c4e778204 /clang/test/Integration | |
parent | f0e27e63e74977527e6e86a0117a64fbf7326b3d (diff) | |
download | bcm5719-llvm-5e97f2344122a287350516067c84dc13f9d71726.tar.gz bcm5719-llvm-5e97f2344122a287350516067c84dc13f9d71726.zip |
Expose -mllvm -accurate-sample-profile to clang.
Summary: With accurate sample profile, we can do more aggressive size optimization. For some size-critical application, this can reduce the text size by 20%
Reviewers: davidxl, rsmith
Reviewed By: davidxl, rsmith
Subscribers: mehdi_amini, eraman, sanjoy, cfe-commits
Differential Revision: https://reviews.llvm.org/D37091
llvm-svn: 311707
Diffstat (limited to 'clang/test/Integration')
-rw-r--r-- | clang/test/Integration/thinlto_profile_sample_accurate.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/test/Integration/thinlto_profile_sample_accurate.c b/clang/test/Integration/thinlto_profile_sample_accurate.c new file mode 100644 index 00000000000..d7966c215cb --- /dev/null +++ b/clang/test/Integration/thinlto_profile_sample_accurate.c @@ -0,0 +1,9 @@ +// Test to ensure -emit-llvm profile-sample-accurate is honored in ThinLTO. +// RUN: %clang -O2 %s -flto=thin -fprofile-sample-accurate -c -o %t.o +// RUN: llvm-lto -thinlto -o %t %t.o +// RUN: %clang_cc1 -O2 -x ir %t.o -fthinlto-index=%t.thinlto.bc -emit-llvm -o - | FileCheck %s + +// CHECK: define void @foo() +// CHECK: attributes {{.*}} "profile-sample-accurate" +void foo() { +} |