Optimal scheduling of loops with dependence cycles on parallel platforms