-
公开(公告)号:US10025569B2
公开(公告)日:2018-07-17
申请号:US15213425
申请日:2016-07-19
Applicant: TEXAS INSTRUMENTS INCORPORATED
Inventor: Alan L. Davis , Paul Fuqua , Timothy John Harvey
Abstract: A compiler converts a high level language program into a corresponding machine level language program. The compiler forms an initial control flow graph of the high level language program with nodes and edge, the nodes including a starting node, initializing a collapse count to zero, and sets the initial control flow graph as a current control flow graph. The compiler performs iterative collapsing operations on the current control flow graph until only a single node remains. After performing the iterative collapsing operations, data flow analysis is performed on the initial control flow graph for a number of iterations equal to one greater than the collapse count. Then, the machine level language program corresponding to the high level language program is generated based upon the data flow analysis.
-
公开(公告)号:US20180024820A1
公开(公告)日:2018-01-25
申请号:US15213425
申请日:2016-07-19
Applicant: TEXAS INSTRUMENTS INCORPORATED
Inventor: Alan L. Davis , Paul Fuqua , Timothy John Harvey
IPC: G06F9/45
Abstract: A compiler converts a human readable high level program into a corresponding machine language program. This invention improves data-flow analysis. A compiler implementing data-flow analysis typically relies on an iterative algorithm for data-flow analysis. According to the prior art determination of the exact number of loop iterations required for convergence was believed impractical. The prior art selected a maximum number of data-flow analysis iterations relatively arbitrarily. This invention calculates the number of iterations for convergence using backedges in a control flow graph of the source program. This permits the data-flow analysis to be run for exactly the number of iterations needed for convergence. In the event of convergence, an extra, useless iteration is avoided. In the event of non-convergence, valid data can be separated from invalid data, whereas all data was previously discarded.
-