[PATCH] D59696: [CGP] Build the DominatorTree lazily

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 08:56:30 PDT 2019


tejohnson marked an inline comment as done.
tejohnson added inline comments.


================
Comment at: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp:345
+      if (!DT)
+        DT = llvm::make_unique<DominatorTree>(F);
+      return *DT;
----------------
spatel wrote:
> fhahn wrote:
> > Would it be worth trying the fetch the DT from the analysis cache for the first time?
> > 
> > Also I am not sure about how common CFG changes are here? If we do not make too many changes, I suppose we could save some more time by lazily updating the DT using the update interface.
> Partly addressed in a newer patch from today:
> D59889
> Would it be worth trying the fetch the DT from the analysis cache for the first time?
> Also I am not sure about how common CFG changes are here? If we do not make too many changes, I suppose we could save some more time by lazily updating the DT using the update interface.

Agree these are better long term fixes for this code (which as @spatel and I discussed recently on D59139 has gotten really unwieldy and could do with an overhaul). My familiarity with this pass is very limited though, I have just been doing some fixes to recover from recent compile-time issues.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D59696





More information about the llvm-commits mailing list