[llvm] f210807 - [LoopCacheAnalysis] Drop isLoopSimplifyForm check (NFCI) (#204822)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 20 03:49:57 PDT 2026


Author: Ryotaro Kasuga
Date: 2026-06-20T10:49:52Z
New Revision: f21080724d2067b5acf01893bf2d544b49239161

URL: https://github.com/llvm/llvm-project/commit/f21080724d2067b5acf01893bf2d544b49239161
DIFF: https://github.com/llvm/llvm-project/commit/f21080724d2067b5acf01893bf2d544b49239161.diff

LOG: [LoopCacheAnalysis] Drop isLoopSimplifyForm check (NFCI) (#204822)

This patch removes the isLoopSimplifyForm() check from
LoopCacheAnalysis. This check was problematic when I tried migrating
LoopCachePrinterPass from a loop pass to a function pass (i.e.,
#204807), because the former applies the loop-simplify pass via
FunctionToLoopPassAdapter, whereas the latter does not. I believe this
check is meaningless because the analysis doesn't pay attention to the
details of the actual loop structure. So this change should not affect
the behavior of the pass.

Added: 
    

Modified: 
    llvm/lib/Analysis/LoopCacheAnalysis.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/LoopCacheAnalysis.cpp b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
index be4dfde85e8da..91ef020eefbaf 100644
--- a/llvm/lib/Analysis/LoopCacheAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopCacheAnalysis.cpp
@@ -679,9 +679,6 @@ bool CacheCost::populateReferenceGroups(ReferenceGroupsTy &RefGroups) const {
 CacheCostTy
 CacheCost::computeLoopCacheCost(const Loop &L,
                                 const ReferenceGroupsTy &RefGroups) const {
-  if (!L.isLoopSimplifyForm())
-    return CacheCostTy::getInvalid();
-
   LLVM_DEBUG(dbgs() << "Considering loop '" << L.getName()
                     << "' as innermost loop.\n");
 


        


More information about the llvm-commits mailing list