[llvm] [LAA] Add initial support for non-power-of-2 store-load forwarding distance (PR #137873)
    Ramkumar Ramachandra via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue May 13 12:06:26 PDT 2025
    
    
  
================
@@ -3000,7 +3039,9 @@ void LoopAccessInfo::print(raw_ostream &OS, unsigned Depth) const {
       OS << " with a maximum safe vector width of "
          << DC.getMaxSafeVectorWidthInBits() << " bits";
     if (!DC.isSafeForAnyStoreLoadForwardDistances()) {
-      uint64_t SLDist = DC.getStoreLoadForwardSafeDistanceInBits();
+      uint64_t SLDist = DC.getNonPowerOf2StoreLoadForwardSafeDistanceInBits();
+      if (SLDist == std::numeric_limits<uint64_t>::max())
+        SLDist = DC.getPowerOf2StoreLoadForwardSafeDistanceInBits();
----------------
artagnon wrote:
This logic would be eliminated by not having two different fields.
https://github.com/llvm/llvm-project/pull/137873
    
    
More information about the llvm-commits
mailing list