发明名称 DECLARED VARIABLE ORDERING AND OPTIMIZING COMPILER
摘要 A variable declaration is identified in a source code file. A variable is identified that is associated with a variable declaration. A location of first use of the variable in the source code is determined. The variable declaration is moved to a first location preceding the location of first use of the variable to optimize the source code.
申请公布号 US2015277868(A1) 申请公布日期 2015.10.01
申请号 US201414228376 申请日期 2014.03.28
申请人 International Business Machines Corporation 发明人 Cowtan Mark G.
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人
主权项 1. A computer-implemented method for optimizing code, the method comprising the steps of: identifying a variable declaration in a source code file; identifying a variable associated with the variable declaration; determining, by one or more computer processors, a location of first use of the variable in the source code file; determining, by one or more computer processors, an empty line located preceding the location of first use of the variable in the source code file; and moving the variable declaration to the empty line.
地址 Armonk NY US