[llvm] [LoopInterchange] Modernize loops (NFC) (PR #146105)

Ryotaro Kasuga via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 27 09:38:38 PDT 2025


================
@@ -1220,8 +1217,8 @@ LoopInterchangeProfitability::isProfitablePerInstrOrderCost() {
 
 /// Return true if we can vectorize the loop specified by \p LoopId.
 static bool canVectorize(const CharMatrix &DepMatrix, unsigned LoopId) {
-  for (unsigned I = 0; I != DepMatrix.size(); I++) {
-    char Dir = DepMatrix[I][LoopId];
+  for (auto Dep : DepMatrix) {
----------------
kasuga-fj wrote:

```suggestion
  for (const auto &Dep : DepMatrix) {
```

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


More information about the llvm-commits mailing list