The scope of DT updates are very limited when unrolling loops: the DT
should only need updating for
- new blocks added
- exiting blocks we simplified branches
This can be done manually without too much extra work.
MergeBlockIntoPredecessor and changeToUnreachable also need to be
updated to support direct DT updates.
This fixes excessive time spent in DTU for same cases. In an internal
example, time spent in LoopUnroll with this patch goes from ~200s to 2s.
It also is slightly positive for CTMark:
- NewPM-O3: -0.13%
- NewPM-ReleaseThinLTO: -0.11%
- NewPM-ReleaseLTO-g: -0.13%
Notable improvements are mafft (~ -0.50%) and lencod (~ -0.30%), with no
workload regressed.
nit: s/use it to update the dominator tree directly/update it directly