On 06/04/2018 18:14, Edward Cree wrote: <snip>
Since that algorithm selects + * nodes in the order of the sorted output, we can do our processing in the loop + * that does the tsort, rather than storing the sorted list and then having a + * second loop to iterate over it and compute the total_stack_depth values. */
IMO, seperate the sort from depth calculation is better than combining them. The tsort of call graph could potentially be used in other places.