The present invention provides for a method for computer program
functional partitioning for heterogeneous multi-processing systems. At
least one system parameter of a computer system comprising one or more
disparate processing nodes is identified. Computer program code
comprising a program to be run on the computer system is received. A
whole program representation is generated based on received computer
program code. At least one single-entry-single-exit (SESE) region is
identified based on the whole program representation. At least one
node-specific SESE region is identified based on identified SESE regions
and the at least one system parameter. Each node-specific SESE region is
grouped into a node-specific subroutine. Each node-specific subroutine is
compiled based on a specified node characteristic. The computer program
code is modified based on the node-specific subroutines and the modified
computer program code is compiled.