diff --git a/loopy/schedule.py b/loopy/schedule.py index b270696709b3b9035ddf58b6eb2c4381f035dab8..8c61405e0426cfb81c53449838b310b37e02ae6e 100644 --- a/loopy/schedule.py +++ b/loopy/schedule.py @@ -206,7 +206,6 @@ def generate_loop_schedules_internal(kernel, loop_priority, schedule=[]): print "--------------------------------------------" dump_schedule(schedule) - if debug_mode: print "active:", ",".join(active_inames) print "entered:", ",".join(entered_inames) @@ -313,9 +312,17 @@ def generate_loop_schedules_internal(kernel, loop_priority, schedule=[]): continue insn = kernel.id_to_insn[insn_id] - if hypothetical_active_loops <= kernel.insn_inames(insn): - useful = True - break + if insn.boostable: + # if insn is boostable, just increasing the number of used + # inames is enough--not necessarily all must be truly 'useful'. + + if iname in kernel.insn_inames(insn): + useful = True + break + else: + if hypothetical_active_loops <= kernel.insn_inames(insn): + useful = True + break if not useful: if debug_mode: