发明名称 Updating profile frequency for procedure inlining
摘要 A method and apparatus for frequency-updating for procedure inlining. The frequency-updating scheme assumes the call graph of a program has no cycles. It keeps the frequency for each procedure as accurate as that before inlining. Using the present invention, the runtime performance of a source program by a compiler is improved. A source program is analyzed to generate a call graph of the source program, wherein each of the procedures has a first known execution frequency. The call graph is used in conjunction with inlining plans by an inlining algorithm to generate an inlined version of the source program wherein selected call sites have been inlined. An updated execution frequency is generated for each of the procedures and the updated execution frequency for each of the procedures is used to generate optimized executable code for the source program. In various embodiments of the invention, heuristics can be used to calculate cost/benefit ratios for calls in the procedures of the source program to generate a ranking of the call sites and to select calls in the subroutines for inlining. The selected calls are inlined until a predetermined resource limit has been reached. An updated execution frequency is computed each time any of the call sites is inlined. In an embodiment of the invention, the updated execution frequency of the procedures determined by proportional adjustment, wherein the ratio between a procedure's frequency and its statement frequency remains unchanged.
申请公布号 US2005262491(A1) 申请公布日期 2005.11.24
申请号 US20030723877 申请日期 2003.11.26
申请人 GU JUNJIE 发明人 GU JUNJIE
分类号 G06F9/45;(IPC1-7):G06F9/45 主分类号 G06F9/45
代理机构 代理人
主权项
地址