diff options
Diffstat (limited to 'llvm/lib/IR')
-rw-r--r-- | llvm/lib/IR/DiagnosticInfo.cpp | 11 | ||||
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 14 | ||||
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 5 |
3 files changed, 1 insertions, 29 deletions
diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp index 50fe682..f46f0fd 100644 --- a/llvm/lib/IR/DiagnosticInfo.cpp +++ b/llvm/lib/IR/DiagnosticInfo.cpp @@ -393,17 +393,6 @@ std::string DiagnosticInfoOptimizationBase::getMsg() const { return OS.str(); } -DiagnosticInfoMisExpect::DiagnosticInfoMisExpect(const Instruction *Inst, - Twine &Msg) - : DiagnosticInfoWithLocationBase(DK_MisExpect, DS_Warning, - *Inst->getParent()->getParent(), - Inst->getDebugLoc()), - Msg(Msg) {} - -void DiagnosticInfoMisExpect::print(DiagnosticPrinter &DP) const { - DP << getLocationStr() << ": " << getMsg(); -} - void OptimizationRemarkAnalysisFPCommute::anchor() {} void OptimizationRemarkAnalysisAliasing::anchor() {} diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index df4a007..f4e917c 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -138,22 +138,10 @@ bool LLVMContext::getDiagnosticsHotnessRequested() const { void LLVMContext::setDiagnosticsHotnessThreshold(Optional<uint64_t> Threshold) { pImpl->DiagnosticsHotnessThreshold = Threshold; } -void LLVMContext::setMisExpectWarningRequested(bool Requested) { - pImpl->MisExpectWarningRequested = Requested; -} -bool LLVMContext::getMisExpectWarningRequested() const { - return pImpl->MisExpectWarningRequested; -} + uint64_t LLVMContext::getDiagnosticsHotnessThreshold() const { return pImpl->DiagnosticsHotnessThreshold.getValueOr(UINT64_MAX); } -void LLVMContext::setDiagnosticsMisExpectTolerance( - Optional<uint64_t> Tolerance) { - pImpl->DiagnosticsMisExpectTolerance = Tolerance; -} -uint64_t LLVMContext::getDiagnosticsMisExpectTolerance() const { - return pImpl->DiagnosticsMisExpectTolerance.getValueOr(0); -} bool LLVMContext::isDiagnosticsHotnessThresholdSetFromPSI() const { return !pImpl->DiagnosticsHotnessThreshold.hasValue(); diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index 0b39029..b87d285 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -1380,11 +1380,6 @@ public: /// If threshold option is not specified, it is disabled (0) by default. Optional<uint64_t> DiagnosticsHotnessThreshold = 0; - /// The percentage of difference between profiling branch weights and - // llvm.expect branch weights to tolerate when emiting MisExpect diagnostics - Optional<uint64_t> DiagnosticsMisExpectTolerance = 0; - bool MisExpectWarningRequested = false; - /// The specialized remark streamer used by LLVM's OptimizationRemarkEmitter. std::unique_ptr<LLVMRemarkStreamer> LLVMRS; |