On 11/18/2014 11:48 AM, Yangfei (Felix) wrote: > +(define_expand "doloop_end" > + [(use (match_operand 0 "" "")) ; loop pseudo > + (use (match_operand 1 "" ""))] ; label > + "" > +{ > + /* Currently SMS relies on the do-loop pattern to recognize loops > + where (1) the control part consists of all insns defining and/or > + using a certain 'count' register and (2) the loop count can be > + adjusted by modifying this register prior to the loop. > + ??? The possible introduction of a new block to initialize the > + new IV can potentially affect branch optimizations. */ > + if (optimize > 0 && flag_modulo_sched)
You'd be better off moving this condition into the expansion predicate (which is currently ""). This short-circuits a lot of unnecessary work. See pass_rtl_doloop::gate. r~