[llvm] [LoopInterchange] Ignore the cost-model, force interchange if legal (PR #148858)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 17 06:00:59 PDT 2025


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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/Scalar/LoopInterchange.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
index f92ed5751..d7a42318e 100644
--- a/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopInterchange.cpp
@@ -114,7 +114,7 @@ static cl::list<RuleTy> Profitabilities(
                           "Prioritize vectorization"),
                clEnumValN(RuleTy::Ignore, "ignore",
                           "Ignore profitability, force interchange (does not "
-			  "work with other options)")));
+                          "work with other options)")));
 
 #ifndef NDEBUG
 static bool noDuplicateRules(ArrayRef<RuleTy> Rules) {
@@ -1368,8 +1368,7 @@ bool LoopInterchangeProfitability::isProfitable(
     unsigned OuterLoopId, CharMatrix &DepMatrix, CacheCostManager &CCM) {
 
   // Return true if interchange is forced.
-  if (Profitabilities.size() == 1 &&
-      Profitabilities[0] == RuleTy::Ignore)
+  if (Profitabilities.size() == 1 && Profitabilities[0] == RuleTy::Ignore)
     return true;
 
   // isProfitable() is structured to avoid endless loop interchange. If the

``````````

</details>


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


More information about the llvm-commits mailing list