From 8cbdb1e0814abff16a69e2243bbe4f4318f278ae Mon Sep 17 00:00:00 2001 From: eopXD Date: Thu, 29 Sep 2022 06:30:32 -0700 Subject: [PATCH] [LSR][NFC] Add missing constness --- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp index 8c94380..4696fe5 100644 --- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -1075,7 +1075,7 @@ public: 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; -- 2.7.4