diff options
author | Teresa Johnson <tejohnson@google.com> | 2018-05-05 14:37:29 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2018-05-05 14:37:29 +0000 |
commit | 4f0b283fff0d4d90392b204ccb88b77e6f45dca0 (patch) | |
tree | f755d94970d44a806927b84c0550b2f6ab94dfb0 /lib/Frontend/CompilerInvocation.cpp | |
parent | a2d602fc902b93f8858be1a93527dca928725571 (diff) | |
download | clang-4f0b283fff0d4d90392b204ccb88b77e6f45dca0.tar.gz |
[ThinLTO] Support opt remarks options with distributed ThinLTO backends
Summary:
Passes down the necessary code ge options to the LTO Config to enable
-fdiagnostics-show-hotness and -fsave-optimization-record in the ThinLTO
backend for a distributed build.
Also, remove warning about not having PGO when the input is IR.
Reviewers: pcc
Subscribers: mehdi_amini, inglorion, eraman, cfe-commits
Differential Revision: https://reviews.llvm.org/D46464
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@331592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 94e3332fc4..cb10706818 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -1075,7 +1075,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, bool UsingProfile = UsingSampleProfile || (Opts.getProfileUse() != CodeGenOptions::ProfileNone); - if (Opts.DiagnosticsWithHotness && !UsingProfile) + if (Opts.DiagnosticsWithHotness && !UsingProfile && + // An IR file will contain PGO as metadata + IK.getLanguage() != InputKind::LLVM_IR) Diags.Report(diag::warn_drv_diagnostics_hotness_requires_pgo) << "-fdiagnostics-show-hotness"; |