[polly] 3272ba7 - [Polly] Honor 'scops' phase being disabled (#180380)

via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 16 02:00:53 PST 2026


Author: Michael Kruse
Date: 2026-02-16T11:00:49+01:00
New Revision: 3272ba7b8fd7672b92eb969e71533b4115e74ecd

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

LOG: [Polly] Honor 'scops' phase being disabled (#180380)

`opt -passes=polly-custom<detect>`, or `stopafter=detect` would still
run the ScopInfo analysis even though it should run when explicitly
enabled or required by another phase.

Added: 
    

Modified: 
    polly/lib/Pass/PhaseManager.cpp

Removed: 
    


################################################################################
diff  --git a/polly/lib/Pass/PhaseManager.cpp b/polly/lib/Pass/PhaseManager.cpp
index 330dfe8b1ef1e..5e716ebc91af2 100644
--- a/polly/lib/Pass/PhaseManager.cpp
+++ b/polly/lib/Pass/PhaseManager.cpp
@@ -128,6 +128,10 @@ class PhaseManager {
     if (Opts.isPhaseEnabled(PassPhase::ViewScopsOnly))
       ViewScops("scopsonly", true);
 
+    // Can't do anything after this without ScopInfo.
+    if (!Opts.isPhaseEnabled(PassPhase::ScopInfo))
+      return false;
+
     // Phase: scops
     AssumptionCache &AC = FAM.getResult<AssumptionAnalysis>(F);
     const DataLayout &DL = F.getParent()->getDataLayout();


        


More information about the llvm-commits mailing list