[llvm] b0fc765 - [NFC] Change LoopVectorizationCostModel::useOrderedReductions() to be a const function.

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 05:39:18 PDT 2022


Author: Mel Chen
Date: 2022-05-31T05:39:13-07:00
New Revision: b0fc765350fe8f7f857985718a50463d22758ef1

URL: https://github.com/llvm/llvm-project/commit/b0fc765350fe8f7f857985718a50463d22758ef1
DIFF: https://github.com/llvm/llvm-project/commit/b0fc765350fe8f7f857985718a50463d22758ef1.diff

LOG: [NFC] Change LoopVectorizationCostModel::useOrderedReductions() to be a const function.

Reviewed By: fhahn

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

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 579d2dfb357dd..268a90c5d3dac 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -1310,7 +1310,7 @@ class LoopVectorizationCostModel {
   /// 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();
   }
 


        


More information about the llvm-commits mailing list