发明名称 Optimized compiling of a template function
摘要 A template function is received. The template function includes one or more data types. A single abstract instantiation of the template function is created. An abstract internal descriptor for each data type is created. A map set for each abstract internal descriptor is created. The number of instantiations required and the type of instantiation required is provided. A finished object is created using each map set. The finished object is a translation of the intermediate representation into assembly code.
申请公布号 US9524153(B1) 申请公布日期 2016.12.20
申请号 US201615053115 申请日期 2016.02.25
申请人 International Business Machines Corporation 发明人 Guan Xiao Feng;Guo JiuFu;Ji Jin Song;Liu Jia Bing
分类号 G06F9/45 主分类号 G06F9/45
代理机构 代理人 Jochym Alexander G.
主权项 1. A method for optimized compiling of a template function, the method comprising: receiving, by one or more computer processors, the template function, wherein the template function includes one or more data types; creating, by the one or more computer processors, a single abstract instantiation for the template function; creating, by the one or more computer processors, an abstract internal descriptor for each unique parameter found in the template function, wherein the each unique parameter consists of parameters for each of the one or more data types included in the template function, and wherein the each unique parameter for the each data type of the one or more data types is represented by symbols with various attributes in a compiler, and the abstract internal descriptor is an internal symbol with undefined contents; generating, by the one or more computer processors, a map set for the one or more created abstract internal descriptor, wherein the map set is a link between the template function and the parameters in the template function, and wherein the map set provides one or more of the following: the number of instantiations required from the single abstract instantiation and what type of instantiations are required; and creating, by the one or more computer processors, a finished object using the generated map set, wherein the finished object is a translation of an intermediate representation into assembly code and the finished object is an executable file, wherein creating the finished object comprises: executing, by the one or more computer processors, a single back-end compiling optimization of a single front-end compiling abstract instantiation, optimization are steps for converting a source code into the executable file; andcreating the executable file via late instantiation of an optimized abstract instantiation.
地址 Armonk NY US