[llvm] 1ca02bd - [ConstraintSystem] Mark function as const (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 27 05:44:57 PST 2022


Author: Florian Hahn
Date: 2022-01-27T13:44:47Z
New Revision: 1ca02bddb46c1de728e30303d3d828e9a6720e05

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

LOG: [ConstraintSystem] Mark function as const (NFC).

Added: 
    

Modified: 
    llvm/include/llvm/Analysis/ConstraintSystem.h
    llvm/lib/Analysis/ConstraintSystem.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Analysis/ConstraintSystem.h b/llvm/include/llvm/Analysis/ConstraintSystem.h
index d5b8f208172bb..d7800f5783253 100644
--- a/llvm/include/llvm/Analysis/ConstraintSystem.h
+++ b/llvm/include/llvm/Analysis/ConstraintSystem.h
@@ -73,7 +73,7 @@ class ConstraintSystem {
     return R;
   }
 
-  bool isConditionImplied(SmallVector<int64_t, 8> R);
+  bool isConditionImplied(SmallVector<int64_t, 8> R) const;
 
   void popLastConstraint() { Constraints.pop_back(); }
 

diff  --git a/llvm/lib/Analysis/ConstraintSystem.cpp b/llvm/lib/Analysis/ConstraintSystem.cpp
index 9739c6af5769a..773f71ada0eec 100644
--- a/llvm/lib/Analysis/ConstraintSystem.cpp
+++ b/llvm/lib/Analysis/ConstraintSystem.cpp
@@ -142,7 +142,7 @@ bool ConstraintSystem::mayHaveSolution() {
   return HasSolution;
 }
 
-bool ConstraintSystem::isConditionImplied(SmallVector<int64_t, 8> R) {
+bool ConstraintSystem::isConditionImplied(SmallVector<int64_t, 8> R) const {
   // If all variable coefficients are 0, we have 'C >= 0'. If the constant is >=
   // 0, R is always true, regardless of the system.
   if (all_of(makeArrayRef(R).drop_front(1), [](int64_t C) { return C == 0; }))


        


More information about the llvm-commits mailing list