[PATCH] D136332: [FuncSpec][NFC] Avoid redundant computations of DominatorTree/LoopInfo
    Alexandros Lamprineas via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Mon Oct 24 06:32:20 PDT 2022
    
    
  
labrinea added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/SCCPSolver.cpp:342-347
+  const LoopInfo &getLoopInfo(Function &F) {
+    auto A = AnalysisResults.find(&F);
+    assert(A != AnalysisResults.end() && A->second.LI &&
+           "Need LoopInfo analysis results for function.");
+    return *A->second.LI;
+  }
----------------
SjoerdMeijer wrote:
> ChuanqiXu wrote:
> > I feel like the assertion may be triggered if we run specializer on the specialized functions. This **looks** possible when `FuncSpecializationMaxIters>1` but we only calculate the analysis once.
> Or with the legacy pass manager? Is that how I should read the comment above:
> 
>   // We cannot preserve the LI, DT, or PDT with the legacy pass ...
@ChuanqiXu I don't think we ever pass cloned functions to `findSpecializations()` (see isCandidateFunction() - it early returns if SpecializedFuncs.contains(F))
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136332/new/
https://reviews.llvm.org/D136332
    
    
More information about the llvm-commits
mailing list