[llvm] 8cbdb1e - [LSR][NFC] Add missing constness
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 06:31:29 PDT 2022
Author: eopXD
Date: 2022-09-29T06:30:50-07:00
New Revision: 8cbdb1e0814abff16a69e2243bbe4f4318f278ae
URL: https://github.com/llvm/llvm-project/commit/8cbdb1e0814abff16a69e2243bbe4f4318f278ae
DIFF: https://github.com/llvm/llvm-project/commit/8cbdb1e0814abff16a69e2243bbe4f4318f278ae.diff
LOG: [LSR][NFC] Add missing constness
Added:
Modified:
llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index 8c94380821b6..4696fe5f4900 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -1075,7 +1075,7 @@ class Cost {
C.ScaleCost = 0;
}
- bool isLess(const Cost &Other);
+ bool isLess(const Cost &Other) const;
void Lose();
@@ -1474,7 +1474,7 @@ void Cost::Lose() {
}
/// Choose the lower cost.
-bool Cost::isLess(const Cost &Other) {
+bool Cost::isLess(const Cost &Other) const {
if (InsnsCost.getNumOccurrences() > 0 && InsnsCost &&
C.Insns != Other.C.Insns)
return C.Insns < Other.C.Insns;
More information about the llvm-commits
mailing list