[TODO] DominatorTree
https://youtu.be/bNV18Wy-J0U?si=n-hxGVmCqGD5LqYv
You make some transformation
It was very hard to update dominator tree because
First you had to figure out what you information actually did
And how it affected the dominator like you had to update or manipulate
Nodes and glue them together to some other nodes to make a transformation
Also on the dominator tree
This turns out to be very difficult for humans to reason about
And is it’s extremely error-prone and what’s more like the error can propagate
A lot and like expose some weird behavior in some consequent passes
Or transformation like it’s very surprising at times and because
Updating dominators used to be tricky people just need to not preserve them
Or just to recalculate them everywhere
https://llvm.org/devmtg/2017-10/slides/Kuderski-Dominator_Trees.pdf
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Domtree Pass
$ build-llvm-trunk/bin/opt -passes=dot-dom gvn.ll
$ dot -Tpng .dom.<함수이름>.dot > dot.png