1. A method for controlling scheduling of statements of a program for execution by a computing apparatus, the method comprising performing by a processor configured as a compiler the steps of: identifying a plurality of statements within a loop nest, the plurality of statements representing operations using a variable; determining an original scope of the variable within the loop nest, the original scope being a maximum depth of the loop nest at which all values produced and stored in the variable at a given iteration of the loop nest are also fully consumed by all consumers of the variable at the same iteration, the maximum depth not being greater than the depth at which one or more values are assigned to the variable; and setting a constraint corresponding to a memory footprint of the variable for a scheduler for scheduling the loop nest for execution by the computing apparatus, the constraint being based on, at least in part, the original scope.