diff options
| author | Brian Gesiak <modocache@gmail.com> | 2017-06-30 18:13:59 +0000 |
|---|---|---|
| committer | Brian Gesiak <modocache@gmail.com> | 2017-06-30 18:13:59 +0000 |
| commit | 44e5f6c4acb40c7330686477d7c61a1ffe17029f (patch) | |
| tree | a84c765c5534485ace6b2e10d3daebb90f3ba7d2 /llvm/include | |
| parent | 724990ab643b5497bfa3b3350c11dacbc9d9109b (diff) | |
| download | bcm5719-llvm-44e5f6c4acb40c7330686477d7c61a1ffe17029f.tar.gz bcm5719-llvm-44e5f6c4acb40c7330686477d7c61a1ffe17029f.zip | |
[ORE] Unify spelling as "diagnostics hotness"
Summary:
To enable profile hotness information in diagnostics output, Clang takes
the option `-fdiagnostics-show-hotness` -- that's "diagnostics", with an
"s" at the end. Clang also defines `CodeGenOptions::DiagnosticsWithHotness`.
LLVM, on the other hand, defines
`LLVMContext::getDiagnosticHotnessRequested` -- that's "diagnostic", not
"diagnostics". It's a small difference, but it's confusing, typo-inducing, and
frustrating.
Add a new method with the spelling "diagnostics", and "deprecate" the
old spelling.
Reviewers: anemet, davidxl
Reviewed By: anemet
Subscribers: llvm-commits, mehdi_amini
Differential Revision: https://reviews.llvm.org/D34864
llvm-svn: 306848
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h | 6 | ||||
| -rw-r--r-- | llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h | 2 | ||||
| -rw-r--r-- | llvm/include/llvm/IR/LLVMContext.h | 13 |
3 files changed, 15 insertions, 6 deletions
diff --git a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h index edd9140a349..64dd0737a11 100644 --- a/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h +++ b/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h @@ -34,7 +34,7 @@ class Value; /// /// It allows reporting when optimizations are performed and when they are not /// along with the reasons for it. Hotness information of the corresponding -/// code region can be included in the remark if DiagnosticHotnessRequested is +/// code region can be included in the remark if DiagnosticsHotnessRequested is /// enabled in the LLVM context. class OptimizationRemarkEmitter { public: @@ -45,10 +45,10 @@ public: /// analysis pass). /// /// Note that this ctor has a very different cost depending on whether - /// F->getContext().getDiagnosticHotnessRequested() is on or not. If it's off + /// F->getContext().getDiagnosticsHotnessRequested() is on or not. If it's off /// the operation is free. /// - /// Whereas if DiagnosticHotnessRequested is on, it is fairly expensive + /// Whereas if DiagnosticsHotnessRequested is on, it is fairly expensive /// operation since BFI and all its required analyses are computed. This is /// for example useful for CGSCC passes that can't use function analyses /// passes in the old PM. diff --git a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h index da8fdcdf5a3..6ad5de533d1 100644 --- a/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h +++ b/llvm/include/llvm/CodeGen/MachineOptimizationRemarkEmitter.h @@ -134,7 +134,7 @@ using MNV = DiagnosticInfoMIROptimization::MachineArgument; /// /// It allows reporting when optimizations are performed and when they are not /// along with the reasons for it. Hotness information of the corresponding -/// code region can be included in the remark if DiagnosticHotnessRequested is +/// code region can be included in the remark if DiagnosticsHotnessRequested is /// enabled in the LLVM context. class MachineOptimizationRemarkEmitter { public: diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h index ad011fb72e6..ac805201c88 100644 --- a/llvm/include/llvm/IR/LLVMContext.h +++ b/llvm/include/llvm/IR/LLVMContext.h @@ -187,12 +187,21 @@ public: void *getDiagnosticContext() const; /// \brief Return if a code hotness metric should be included in optimization - /// diagnostics. + /// diagnostics. This method is deprecated; use getDiagnosticsHotnessRequested + /// instead. bool getDiagnosticHotnessRequested() const; /// \brief Set if a code hotness metric should be included in optimization - /// diagnostics. + /// diagnostics. This method is deprecated; use setDiagnosticsHotnessRequested + /// instead. void setDiagnosticHotnessRequested(bool Requested); + /// \brief Return if a code hotness metric should be included in optimization + /// diagnostics. + bool getDiagnosticsHotnessRequested() const; + /// \brief Set if a code hotness metric should be included in optimization + /// diagnostics. + void setDiagnosticsHotnessRequested(bool Requested); + /// \brief Return the YAML file used by the backend to save optimization /// diagnostics. If null, diagnostics are not saved in a file but only /// emitted via the diagnostic handler. |

