A computer-implemented method for scheduling instructions in compiling source code, comprising: generating, from a listing of source code, a plurality of basic blocks for compiling into intermediate language; determining, for a first basic block of the plurality of basic blocks, first heuristics related to applying a first plurality of optimizations to the first basic block, wherein the first plurality of optimizations includes at least one of minimizing register pressure, minimizing program size, or minimizing memory latency, and wherein the first heuristics each correspond to estimated optimization metrics for a given one of the first plurality of optimizations; determining, for a second basic block of the plurality of basic blocks, second heuristics related to applying a second plurality of optimizations to the second basic block, wherein the second plurality of optimizations includes at least one of minimizing register pressure, minimizing program size, or minimizing memory latency, and wherein the second heuristics each correspond to estimated optimization metrics for a given one of the second plurality of optimizations; and applying, based on the first heuristics and the second heuristics, one of the first plurality of optimizations to the first basic block to schedule first instructions for the first basic block and one of the second plurality of optimizations to the second basic block to schedule second instructions for the second basic block, wherein applying comprises: selecting the one of the first plurality of optimizations for the first basic block to achieve an overall optimization based on the first heuristics and the second heuristics; and selecting the one of the second plurality of optimizations for the second basic block to achieve the overall optimization based on the first heuristics and the second heuristics. generating, from a listing of source code, a plurality of basic blocks for compiling into intermediate language; determining, for a first basic block of the plurality of basic blocks, first heuristics related to applying a first plurality of optimizations to the first basic block, wherein the first plurality of optimizations includes at least one of minimizing register pressure, minimizing program size, or minimizing memory latency, and wherein the first heuristics each correspond to estimated optimization metrics for a given one of the first plurality of optimizations; determining, for a second basic block of the plurality of basic blocks, second heuristics related to applying a second plurality of optimizations to the second basic block, wherein the second plurality of optimizations includes at least one of minimizing register pressure, minimizing program size, or minimizing memory latency, and wherein the second heuristics each correspond to estimated optimization metrics for a given one of the second plurality of optimizations; and applying, based on the first heuristics and the second heuristics, one of the first plurality of optimizations to the first basic block to schedule first instructions for the first basic block and one of the second plurality of optimizations to the second basic block to schedule second instructions for the second basic block, wherein applying comprises: selecting the one of the first plurality of optimizations for the first basic block to achieve an overall optimization based on the first heuristics and the second heuristics; and selecting the one of the second plurality of optimizations for the second basic block to achieve the overall optimization based on the first heuristics and the second heuristics. selecting the one of the first plurality of optimizations for the first basic block to achieve an overall optimization based on the first heuristics and the second heuristics; and selecting the one of the second plurality of optimizations for the second basic block to achieve the overall optimization based on the first heuristics and the second heuristics.