[llvm] [DA] do not handle array accesses of different offsets (PR #123436)
    Sebastian Pop via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Apr 11 09:48:03 PDT 2025
    
    
  
================
@@ -1834,6 +1838,12 @@ PreservedAnalyses LoopInterchangePass::run(LoopNest &LN,
   std::unique_ptr<CacheCost> CC =
       CacheCost::getCacheCost(LN.getOutermostLoop(), AR, DI);
 
+  SCEVUnionPredicate Assumptions = DI.getRuntimeAssumptions();
+  // Early fail when the dependence analysis has runtime assumptions.
+  // FIXME: this could be handled by versioning the loop.
+  if (!Assumptions.isAlwaysTrue())
+    return PreservedAnalyses::all();
----------------
sebpop wrote:
Just above this is a call to CacheCost::getCacheCost that queries all dependences in the loop nest to compute cache reuse patterns.
https://github.com/llvm/llvm-project/pull/123436
    
    
More information about the llvm-commits
mailing list