[NFC] Change LoopVectorizationCostModel::useOrderedReductions() to be a const function.
authorMel Chen <mel.chen@sifive.com>
Tue, 31 May 2022 12:38:44 +0000 (05:38 -0700)
committerMel Chen <mel.chen@sifive.com>
Tue, 31 May 2022 12:39:13 +0000 (05:39 -0700)
Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D126200

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

index 579d2df..268a90c 100644 (file)
@@ -1310,7 +1310,7 @@ public:
   /// RdxDesc. This is true if the -enable-strict-reductions flag is passed,
   /// the IsOrdered flag of RdxDesc is set and we do not allow reordering
   /// of FP operations.
-  bool useOrderedReductions(const RecurrenceDescriptor &RdxDesc) {
+  bool useOrderedReductions(const RecurrenceDescriptor &RdxDesc) const {
     return !Hints->allowReordering() && RdxDesc.isOrdered();
   }