This patch delayed the updates of the dominator tree to the very end of the pass instead of doing that in small increments after each basic block.
This improves the runtime of the pass in particular in pathological cases because now the updater sees the full extend of the updates and can decide whether it is faster to apply the changes incrementally or just recompute the full tree from scratch.
Put differently, thanks to this patch, we can take advantage of the improvements that Chijun Sima <simachijun@gmail.com> made in the dominator tree updater a while ago with commit 32fd196cbf4d: "Teach the DominatorTree fallback to recalculation when applying updates to speedup JT (PR37929)".
This change is NFC but can improve the runtime of the compiler dramatically in some pathological cases (where the pass was pushing a lot (several thousands) of small updates (less than 6)).
For instance on the motivating example we went from 300+ sec to less than a second.
How did you pick this constant?