[llvm] [BOLT] Fix double conversion in CacheMetrics (PR #75253)

Maksim Panchenko via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 11 11:20:57 PST 2024


================
@@ -14,22 +14,18 @@
 #include "bolt/Passes/CacheMetrics.h"
 #include "bolt/Core/BinaryBasicBlock.h"
 #include "bolt/Core/BinaryFunction.h"
-#include "llvm/Support/CommandLine.h"
 #include <unordered_map>
 
 using namespace llvm;
 using namespace bolt;
 
-namespace opts {
-
-extern cl::OptionCategory BoltOptCategory;
+namespace {
 
-extern cl::opt<unsigned> ITLBPageSize;
-extern cl::opt<unsigned> ITLBEntries;
+/// The size of an i-tlb cache page.
+constexpr unsigned ITLBPageSize = 4096;
 
-} // namespace opts
-
-namespace {
+/// The number of entries in the i-tlb cache.
+constexpr unsigned ITLBEntries = 16;
----------------
maksfb wrote:

Thanks for the explanation. Could you put a brief summary in the comment?

https://github.com/llvm/llvm-project/pull/75253


More information about the llvm-commits mailing list