From 9d7b680259710d3195304626b65d07fc258e8d95 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 3 Nov 2011 19:05:56 -0500 Subject: [PATCH] Scheduler: Better notion of 'useful' for boostable instructions. --- loopy/schedule.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/loopy/schedule.py b/loopy/schedule.py index b27069670..8c61405e0 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: -- GitLab