[llvm] [LoopInterchange] Make the entries of the Dependency Matrix unique (PR #116195)

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 01:18:46 PST 2024


================
@@ -156,7 +158,10 @@ static bool populateDependencyMatrix(CharMatrix &DepMatrix, unsigned Level,
           Dep.push_back('I');
         }
 
-        DepMatrix.push_back(Dep);
+        // Make sure we only add unique entries to the dependency matrix.
+        if (Seen.insert(std::string(Dep.begin(), Dep.end())).second) 
----------------
sjoerdmeijer wrote:

Thanks, will check and apply this before committing this, which I assume is okay. 

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


More information about the llvm-commits mailing list