1. A computer-implemented method for optimizing program code that is capable of being compiled for execution on a parallel processing unit (PPU), the method comprising: generating a control flow graph for the program code; identifying a first block in the control flow graph with the greatest number of live-in variables compared to other blocks in the control flow graph; selecting a first subset of live-in variables associated with the first block by performing a profitability analysis on different subsets of live-in variables associated with the first block; and optimizing the program code by rematerializing the first subset of live-in variables into a second block in the control flow graph that is subsequent to the first block in the control flow graph, wherein the optimized program code is to be executed on the PPU.