[llvm] 4f1b98b - [Utils] Remove an unnecessary cast (NFC) (#157023)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 4 23:33:21 PDT 2025
Author: Kazu Hirata
Date: 2025-09-05T14:33:17+08:00
New Revision: 4f1b98bf6961971cda30972b9ce08853062d60d9
URL: https://github.com/llvm/llvm-project/commit/4f1b98bf6961971cda30972b9ce08853062d60d9
DIFF: https://github.com/llvm/llvm-project/commit/4f1b98bf6961971cda30972b9ce08853062d60d9.diff
LOG: [Utils] Remove an unnecessary cast (NFC) (#157023)
MergedCounts is of type double.
Added:
Modified:
llvm/lib/Transforms/Utils/CodeLayout.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/CodeLayout.cpp b/llvm/lib/Transforms/Utils/CodeLayout.cpp
index c76b3afef50c2..27b13eeaf4d71 100644
--- a/llvm/lib/Transforms/Utils/CodeLayout.cpp
+++ b/llvm/lib/Transforms/Utils/CodeLayout.cpp
@@ -1285,7 +1285,7 @@ class CDSortImpl {
// Cache misses on the merged chain
double MergedCounts = ChainPred->ExecutionCount + ChainSucc->ExecutionCount;
double MergedSize = ChainPred->Size + ChainSucc->Size;
- double MergedDensity = static_cast<double>(MergedCounts) / MergedSize;
+ double MergedDensity = MergedCounts / MergedSize;
double NewScore = MergedCounts * missProbability(MergedDensity);
return CurScore - NewScore;
More information about the llvm-commits
mailing list