发明申请
- 专利标题: OBSERVATION AND ANALYSIS BASED CODE OPTIMIZATION
- 专利标题(中): 基于观察和分析的代码优化
-
申请号: US12847945申请日: 2010-07-30
-
公开(公告)号: US20120030661A1公开(公告)日: 2012-02-02
- 发明人: Victor Leonel Hernandez Porras , Christopher Arthur Lattner , Jia-Hong Chen , Eric Marshall Christopher , Roger Scott Hoover , Francois Jouaux , Robert John McCall , Thomas John O'Brien , Pratik Solanki
- 申请人: Victor Leonel Hernandez Porras , Christopher Arthur Lattner , Jia-Hong Chen , Eric Marshall Christopher , Roger Scott Hoover , Francois Jouaux , Robert John McCall , Thomas John O'Brien , Pratik Solanki
- 申请人地址: US CA Cupertino
- 专利权人: APPLE INC.
- 当前专利权人: APPLE INC.
- 当前专利权人地址: US CA Cupertino
- 主分类号: G06F9/45
- IPC分类号: G06F9/45
摘要:
Observation and analysis based optimization of software code is disclosed. An expected value is chosen for a dynamic attribute that cannot be determined, prior to execution of the associated software code, to be guaranteed to have that expected value at runtime. An optimized version of the software code is generated, including one or more optimizations based on an assumption that the dynamic attribute will have the expected value. Non-exhaustive examples of a dynamic attribute include a variable type; a location in memory; a location in which a global object, property, or variable is stored; the contents of a global function or method; and a value of a global property or variable. A check is performed during execution of the optimized version of the software code, prior to executing the portion that has been optimized based on the assumption, to verify that the dynamic attribute has the expected value. In the event that it is determined at runtime that the dynamic attribute does not have the expected value, execution reverts to backup code that is not based on the assumption that dynamic attribute will have the expected value.
公开/授权文献
- US09195486B2 Observation and analysis based code optimization 公开/授权日:2015-11-24
信息查询