[llvm-cov][gcov] Optimize the cycle counting algorithm by skipping zero count cycles

This change is similar to http://gcc.gnu.org/PR90380

This reduces the complexity from exponential to polynomial of the arcs.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D93036

GitOrigin-RevId: 97260ab4786f87211b8553b56fd0600016b1d6fa
1 file changed