summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorDehao Chen <dehao@google.com>2017-08-24 21:37:33 +0000
committerDehao Chen <dehao@google.com>2017-08-24 21:37:33 +0000
commit5e97f2344122a287350516067c84dc13f9d71726 (patch)
tree8a66a408a34273f1e203b977422fb21c4e778204 /clang/lib/Frontend/CompilerInvocation.cpp
parentf0e27e63e74977527e6e86a0117a64fbf7326b3d (diff)
downloadbcm5719-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/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index 24a08e84dc4..aea3af98285 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -652,6 +652,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.NoUseJumpTables = Args.hasArg(OPT_fno_jump_tables);
+ Opts.ProfileSampleAccurate = Args.hasArg(OPT_fprofile_sample_accurate);
+
Opts.PrepareForLTO = Args.hasArg(OPT_flto, OPT_flto_EQ);
Opts.EmitSummaryIndex = false;
if (Arg *A = Args.getLastArg(OPT_flto_EQ)) {
OpenPOWER on IntegriCloud