Patent ID: 8051411

Claim:
A method for copy propagations, applied to a processor with distributed register file design, the method comprising the steps of: (a) providing the distributed register file architectures, which include two clusters, each cluster comprising a first function unit and a second function unit, a first local register file and a second local register file being respectively accessible by the first and second function unit only, and a global register file having a ping-pong structure to access the first and second local register files; (b) executing possible copy propagation paths between two nodes of a data flow graph, wherein the data flow graph is formed by the first local register file and the second local register file in the two clusters and the global register file; (c) calculating a profit of machine cycles for each of the copy propagation paths according to constraints of the distributed register file architectures; and (d) performing a copy propagation through the copy propagation path if the profit thereof is greater than a threshold value; wherein the profit is the value of subtracting cost of machine cycles from gain of the machine cycles of the propagation path; wherein the gain of the machine cycles comprises a number of available copy assignments which can be reduced along the copy propagation path; and wherein gain of the available copy assignments should be counted only once if there are shared edges in the copy propagation path between the two nodes.