This patch teaches the DominatorTree verifier to check DFS In/Out numbers which are used to answer dominance queries.
DFS number verification is done in O(nlogn), so it shouldn't add much overhead on top of the O(n^3) sibling property verification.
This check should detect errors like the one spotted in PR34466 and related bug reports.
The patch also cleans up the DFS calculation a bit, as all constructed trees should have a single root now.
I see 2 new test failures when running check-all after this change:
Failing Tests (2): Polly :: Isl/CodeGen/OpenMP/reference-argument-from-non-affine-region.ll Polly :: Isl/CodeGen/OpenMP/two-parallel-loops-reference-outer-indvar.ll
which seem to happen just after Create LLVM-IR from SCoPs -- I don't have much time now, so it would be awesome if the polly folks could help me with fixing that before sending this patch :).