I've been looking at SMS, and have a question about get_sched_window. When there are previously-scheduled predessors, we use:
if (e->data_type == MEM_DEP) end = MIN (end, SCHED_TIME (v_node) + ii - 1); to get an upper bound on the scheduling window that is permitted by memory dependencies. I think this: SCHED_TIME (v_node) + ii - 1 is an inclusive bound, in that scheduling the node at that time would not break the memory dependence, whereas scheduling at SCHED_TIME (v_node) would. Is that right? I ask because in the final range: start = early_start; end = MIN (end, early_start + ii); /* Schedule the node close to it's predecessors. */ step = 1; END is an exclusive bound. It seems like we might be double-counting here, and effectively limiting the schedule to SCHED_TIME (v_node) + ii - 2. While I'm here, I was also curious about: /* If there are more successors than predecessors schedule the node close to it's successors. */ if (count_succs >= count_preds) { int old_start = start; start = end - 1; end = old_start - 1; step = -1; } This doesn't seem to be in the paper, and the comment suggests "count_succs > count_preds" rather than "count_succs >= count_preds". Is the ">=" vs ">" important? Thanks, Richard