[PATCH] D57881: [DTU] Refine the document of mutation APIs [NFC] (PR40528)

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 05:47:40 PST 2019


NutshellySima marked 10 inline comments as done.
NutshellySima added inline comments.


================
Comment at: llvm/include/llvm/Analysis/DomTreeUpdater.h:127
+  /// 2. It is illegal to submit any (From, To) pair that the DomTreeUpdater
+  /// or the DominatorTree already acknowledged.
   void applyUpdates(ArrayRef<DominatorTree::UpdateType> Updates,
----------------
NutshellySima wrote:
> kuhar wrote:
> > I think this is fine with the eager strategy.
> Considering updating DT/PDT under Eager mode is an idempotent action, I think it is applicable to delay the update validity scanning under Lazy mode to the time submitting updates to DT/PDT to avoid some fishy problems involved in JT before and also make applyUpdates() under Lazy mode also idempotent without using "point-based updates" which can have potential performance issues.
I did an experiment on submitting updates already applied to DT, but I observed 1 assertion and 2 crashes running `check-llvm`. I guess it's because of [[ https://github.com/llvm/llvm-project/blob/a9a11aac0f943ef7eccb31214f9fd9eeb340a78e/llvm/include/llvm/Support/GenericDomTreeConstruction.h#L143-L159 | this piece of code ]]. And it is also helpful to make DTU deduplicate reliably (see [[ https://reviews.llvm.org/D58170 | D58170 ]]). So I keep this note.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D57881





More information about the llvm-commits mailing list