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/lib/Frontend/CompilerInvocation.cpp | |
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/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | clang/lib/Frontend/CompilerInvocation.cpp | 2 |
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)) { |