We should use dbg_cnt instead of MAX_SMS_LOOP_NUMBER in modulo-sched.c. Perhaps these counters should be part of every pass, and use the inherent pass names. In some cases a pass may want more than one counter. Are there any optimizations that cannot make use of such a counter? Ayal.