1. A computer-implemented method for partitioning an application program as part of translating the application program for execution by a general purpose processor, the method comprising: receiving the application program written using a parallel programming model for execution on a multi-core graphics processing unit; initializing a current partition; examining a statement in the application program; adding the statement to the current partition when the statement is not a synchronization barrier instruction; storing the current partition to an output list of partitions and starting a new partition when the statement is a synchronization barrier instruction or when the statement represents a start of a control-flow construct that includes a synchronization barrier instruction; and repeating the steps of examining, adding, and storing until all statements in the application program have been examined in sequence to produce the output list of partitions as a partitioned application program.