发明名称 Fast, combined forwards-backwards pass global optimization framework for dynamic compilers
摘要 The various aspects provide a dynamic compilation framework that includes a machine-independent optimization module operating on a computing device and methods for optimizing code with the machine-independent optimization module using a single, combined-forwards-backwards pass of the code. In the various aspects, the machine-independent optimization module may generate a graph of nodes from the IR, optimize nodes in the graph using forwards and backwards optimizations, and propagating the forwards and backwards optimizations to nodes in a bounded subgraph recognized or defined based on the position of the node currently being optimized. In the various aspects, the machine-independent optimization module may optimize the graph by performing forwards and/or backwards optimizations during a single pass through the graph, thereby achieving an effective degree of optimization and shorter overall compile times. Thus, the various aspects may provide a global optimization framework for dynamic compilers that is faster and more efficient than existing solutions.
申请公布号 US9176760(B2) 申请公布日期 2015.11.03
申请号 US201314034770 申请日期 2013.09.24
申请人 QUALCOMM Incorporated 发明人 Halambi Ashok;Wright Gregory M.;Vick Christopher A.
分类号 G06F9/44;G06F9/455;G06F9/45 主分类号 G06F9/44
代理机构 The Marbury Law Group, PLLC 代理人 The Marbury Law Group, PLLC
主权项 1. A method of optimizing an intermediate representation of source code, comprising: generating a graph from the intermediate representation, wherein the graph comprises a plurality of nodes; initializing a ready list; adding a start node in the plurality of nodes to the ready list; selecting a node in the ready list; incrementing a visitation counter of the selected node; determining whether the selected node has been visited more than twice; determining whether to apply a forwards optimization on the selected node in response to determining that the selected node has not been visited more than twice; applying the forwards optimization on the selected node in response to determining to apply the forwards optimization on the selected node; recognizing a bounded subgraph based on the selected node; initializing a successor list; adding all successors of the selected node in the bounded subgraph to the successor list; choosing a successor node from the successor list; incrementing a visitation counter of the chosen successor node; determining whether the chosen successor node has been visited more than twice; determining whether to apply the forwards optimization on the chosen successor node in response to determining that the chosen successor node has not been visited twice; applying the forwards optimization on the chosen successor node in response to determining to apply the forwards optimization; determining whether the chosen successor node is an exit node; adding successors of the chosen successor node to the successor list unless it is determined that the chosen successor node is an exit node or it is determined not to apply the forwards optimization on the chosen successor node; and removing the chosen successor node from the successor list.
地址 San Diego CA US