[llvm] [polly] [ConstraintElimination] Use SCEV ranges information for Loop counter (PR #91457)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 06:11:26 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff febd89cafea11e6603f593e41be1a21ca9d009ac 86f4583def5ebd87a1ac08a819fee85f6fc53ae7 -- llvm/include/llvm/Analysis/ConstraintSystem.h llvm/lib/Analysis/ConstraintSystem.cpp llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/Analysis/ConstraintSystem.h b/llvm/include/llvm/Analysis/ConstraintSystem.h
index d8698a6f64..32f61caee0 100644
--- a/llvm/include/llvm/Analysis/ConstraintSystem.h
+++ b/llvm/include/llvm/Analysis/ConstraintSystem.h
@@ -43,8 +43,9 @@ class ConstraintSystem {
     return 0;
   }
 
-  // WARNING: it represents rather the maximum number of coefficients in the constraints
-  // which is actually the number of variables PLUS one (for the constant part).
+  // WARNING: it represents rather the maximum number of coefficients in the
+  // constraints which is actually the number of variables PLUS one (for the
+  // constant part).
   size_t NumVariables = 0;
 
   /// Current linear constraints in the system.
diff --git a/llvm/lib/Analysis/ConstraintSystem.cpp b/llvm/lib/Analysis/ConstraintSystem.cpp
index 9dc6d25d11..9f7c32207f 100644
--- a/llvm/lib/Analysis/ConstraintSystem.cpp
+++ b/llvm/lib/Analysis/ConstraintSystem.cpp
@@ -124,8 +124,9 @@ bool ConstraintSystem::eliminateUsingFM() {
 }
 
 bool ConstraintSystem::mayHaveSolutionImpl() {
-  while (!Constraints.empty() && Constraints.size() <= 500 && NumVariables > 1) {
-    if(!eliminateUsingFM()) {
+  while (!Constraints.empty() && Constraints.size() <= 500 &&
+         NumVariables > 1) {
+    if (!eliminateUsingFM()) {
       LLVM_DEBUG(
           dbgs()
           << "Some new constraints has been ignored during elimination.\n");

``````````

</details>


https://github.com/llvm/llvm-project/pull/91457


More information about the llvm-commits mailing list