diff options
Diffstat (limited to 'llvm/tools/opt/opt.cpp')
-rw-r--r-- | llvm/tools/opt/opt.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index 8ad560323af..0a4ce1dfe8e 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -215,6 +215,11 @@ static cl::opt<bool> DiscardValueNames( cl::desc("Discard names from Value (other than GlobalValue)."), cl::init(false), cl::Hidden); +static cl::opt<bool> PassRemarksWithHotness( + "pass-remarks-with-hotness", + cl::desc("With PGO, include profile count in optimization remarks"), + cl::Hidden); + static inline void addPass(legacy::PassManagerBase &PM, Pass *P) { // Add the pass to the pass manager... PM.add(P); @@ -384,6 +389,9 @@ int main(int argc, char **argv) { if (!DisableDITypeMap) Context.enableDebugTypeODRUniquing(); + if (PassRemarksWithHotness) + Context.setDiagnosticHotnessRequested(true); + // Load the input module... std::unique_ptr<Module> M = parseIRFile(InputFilename, Err, Context); |