[PATCH] D58187: Teach DTU to recalculate DT/PDT automatically when EntryBB is changed

Chijun Sima via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 13 08:56:50 PST 2019


NutshellySima created this revision.
NutshellySima added reviewers: kuhar, brzycki, mkazantsev, chandlerc, dmgreen.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.

Previously, after the EntryBB is changed, due to restrictions of the DominatorTree, it is needed to call recalculate() explicitly.
This patch teaches DTU to detect the change of EntryBB when calling `applyUpdates/insertEdge*/deleteEdge*/*deleteBB/getDT/getPDT/flush` and recalculate available trees if it is needed, which makes DTU more friendly to use.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D58187

Files:
  llvm/include/llvm/Analysis/DomTreeUpdater.h
  llvm/include/llvm/Support/GenericDomTree.h
  llvm/lib/Analysis/DomTreeUpdater.cpp
  llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp
  llvm/lib/Transforms/Utils/Local.cpp
  llvm/unittests/Analysis/DomTreeUpdaterTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58187.186679.patch
Type: text/x-patch
Size: 10632 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190213/73cbe61a/attachment-0001.bin>


More information about the llvm-commits mailing list