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; estimating a profitability value for each of different subsets of live-in variables associated with the first block by performing a profitability analysis on each of the different subsets; selecting a first subset of live-in variables based on the first subset of live-in variables having the greatest profitability value compared to the profitability values associated with the other different subsets of live-in variables; 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.