diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/IR/LLVMContext.cpp | 4 | ||||
-rw-r--r-- | llvm/lib/IR/LLVMContextImpl.h | 4 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/MisExpect.cpp | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp index 57d7261..993bfff 100644 --- a/llvm/lib/IR/LLVMContext.cpp +++ b/llvm/lib/IR/LLVMContext.cpp @@ -148,10 +148,10 @@ uint64_t LLVMContext::getDiagnosticsHotnessThreshold() const { return pImpl->DiagnosticsHotnessThreshold.value_or(UINT64_MAX); } void LLVMContext::setDiagnosticsMisExpectTolerance( - Optional<uint64_t> Tolerance) { + Optional<uint32_t> Tolerance) { pImpl->DiagnosticsMisExpectTolerance = Tolerance; } -uint64_t LLVMContext::getDiagnosticsMisExpectTolerance() const { +uint32_t LLVMContext::getDiagnosticsMisExpectTolerance() const { return pImpl->DiagnosticsMisExpectTolerance.value_or(0); } diff --git a/llvm/lib/IR/LLVMContextImpl.h b/llvm/lib/IR/LLVMContextImpl.h index a36e46f..0b1e519 100644 --- a/llvm/lib/IR/LLVMContextImpl.h +++ b/llvm/lib/IR/LLVMContextImpl.h @@ -1387,8 +1387,8 @@ public: 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; + /// llvm.expect branch weights to tolerate when emiting MisExpect diagnostics + Optional<uint32_t> DiagnosticsMisExpectTolerance = 0; bool MisExpectWarningRequested = false; /// The specialized remark streamer used by LLVM's OptimizationRemarkEmitter. diff --git a/llvm/lib/Transforms/Utils/MisExpect.cpp b/llvm/lib/Transforms/Utils/MisExpect.cpp index 8f94902..28649b0 100644 --- a/llvm/lib/Transforms/Utils/MisExpect.cpp +++ b/llvm/lib/Transforms/Utils/MisExpect.cpp @@ -58,7 +58,7 @@ static cl::opt<bool> PGOWarnMisExpect( cl::desc("Use this option to turn on/off " "warnings about incorrect usage of llvm.expect intrinsics.")); -static cl::opt<unsigned> MisExpectTolerance( +static cl::opt<uint32_t> MisExpectTolerance( "misexpect-tolerance", cl::init(0), cl::desc("Prevents emiting diagnostics when profile counts are " "within N% of the threshold..")); @@ -72,7 +72,7 @@ bool isMisExpectDiagEnabled(LLVMContext &Ctx) { } uint64_t getMisExpectTolerance(LLVMContext &Ctx) { - return std::max(static_cast<uint64_t>(MisExpectTolerance), + return std::max(static_cast<uint32_t>(MisExpectTolerance), Ctx.getDiagnosticsMisExpectTolerance()); } |