diff options
author | Xinliang David Li <davidxl@google.com> | 2016-08-11 05:09:30 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2016-08-11 05:09:30 +0000 |
commit | 76a0108be44fadc451b71a77b3652e5ba55f7fa4 (patch) | |
tree | cd4e774f880d2d99d72e535283c4b9053c6983b5 /llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | |
parent | 4173fffa0868688ad83aadb547b263139eb55684 (diff) | |
download | bcm5719-llvm-76a0108be44fadc451b71a77b3652e5ba55f7fa4.tar.gz bcm5719-llvm-76a0108be44fadc451b71a77b3652e5ba55f7fa4.zip |
[Profile] improve warning control option
Change --no-pgo-warn-missing to -pgo-warn-missing-function
and negate the default. /NFC
Add more test to make sure the warning is off by default
llvm-svn: 278314
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp index 83309f3e23b..926240828dd 100644 --- a/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp +++ b/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp @@ -124,8 +124,9 @@ static cl::opt<bool> DoComdatRenaming( // Command line option to enable/disable the warning about missing profile // information. -static cl::opt<bool> NoPGOWarnMissing("no-pgo-warn-missing", cl::init(true), - cl::Hidden); +static cl::opt<bool> PGOWarnMissing("pgo-warn-missing-function", + cl::init(false), + cl::Hidden); // Command line option to enable/disable the warning about a hash mismatch in // the profile data. @@ -707,7 +708,7 @@ bool PGOUseFunc::readCounters(IndexedInstrProfReader *PGOReader) { bool SkipWarning = false; if (Err == instrprof_error::unknown_function) { NumOfPGOMissing++; - SkipWarning = NoPGOWarnMissing; + SkipWarning = !PGOWarnMissing; } else if (Err == instrprof_error::hash_mismatch || Err == instrprof_error::malformed) { NumOfPGOMismatch++; |