Implement loop depth calculation in terms of dominators instead of intervals