发明名称 |
Globally inline a callee with high cost-effectiveness on the basis only of profile information in a call graph |
摘要 |
A mechanism is provided to globally inline a callee with high cost-effectiveness on the basis only of profile information in a call graph, without looking through all call-graph edges. The mechanism provides a technique for inlining. An inline cost-effectiveness ratio for the callee reachable from a caller to be compiled is calculated. Calculating the inline cost-effectiveness ration includes using a ratio of a frequency of calls to the callee to a total of call frequencies as effectiveness and using a ratio of a code size of the callee to a total size of inlinable code as cost. A determination is made as to whether to inline the callee by comparing the inline cost-effectiveness ratio with a predetermined threshold. The callee is inlined into a source code in response to determining that the callee method is to be inlined. |
申请公布号 |
US9244666(B2) |
申请公布日期 |
2016.01.26 |
申请号 |
US201514631207 |
申请日期 |
2015.02.25 |
申请人 |
International Business Machines Corporation |
发明人 |
Nakaike Takuya;Suganuma Toshio |
分类号 |
G06F9/45 |
主分类号 |
G06F9/45 |
代理机构 |
|
代理人 |
Lammes Francis;Walder, Jr. Stephen J.;Stock William J. |
主权项 |
1. A method, executed by a computer, for inlining, comprising:
calculating, by a processor in the computer, an inline cost-effectiveness ratio for a callee reachable from a caller to be compiled, wherein calculating the inline cost-effectiveness ratio includes using a ratio of a frequency of calls to the callee to a total of frequencies of calls as effectiveness in the inline cost-effectiveness ratio, and using a ratio of a code size of the callee to a total size of inlinable code as cost in the inline cost-effectiveness ratio; determining, by the processor in the computer, whether to inline the callee by comparing the inline cost-effectiveness ratio with a predetermined threshold; and inlining, by the processor in the computer, the callee into a source code in response to determining that the callee is to be inlined. |
地址 |
Armonk NY US |