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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 27 13:23:16 PDT 2019


spatel added inline comments.


================
Comment at: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp:345
+      if (!DT)
+        DT = llvm::make_unique<DominatorTree>(F);
+      return *DT;
----------------
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


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