[PATCH] D136332: [FuncSpec][NFC] Avoid redundant computations of DominatorTree/LoopInfo

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 23 19:34:24 PDT 2022


ChuanqiXu 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;
+  }
----------------
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.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136332/new/

https://reviews.llvm.org/D136332



More information about the llvm-commits mailing list