-
公开(公告)号:US09448929B1
公开(公告)日:2016-09-20
申请号:US14328407
申请日:2014-07-10
Applicant: GOOGLE INC.
Inventor: Hannes Payer , Daniel Kenneth Clifford , Ben Titzer , Michael Starzinger
CPC classification number: G06F12/0253 , G06F12/023 , G06F12/0276 , G06F2212/1024
Abstract: A computer-implemented method for compilation of applications can include receiving a set of software instructions and traversing the set of software instructions based on a control-flow order of the set of software instructions. The traversing can include identifying a first allocation instruction in the set of software instructions, the first allocation instruction being configured to allocate a first amount of memory for a first object and identifying a second allocation instruction in the set of software instructions, the second allocation instruction being configured to allocate a second amount of memory for a second object. The method can include determining that the first allocation instruction dominates the second allocation instruction and, in response to the determining, combining the first allocation instruction and the second allocation instruction into a folded allocation instruction that allocates the first amount of memory and the second amount of memory in a single memory allocation operation.
Abstract translation: 用于编译应用的计算机实现的方法可以包括基于软件指令集的控制流顺序来接收一组软件指令并遍历该组软件指令。 所述遍历可以包括识别所述软件指令集中的第一分配指令,所述第一分配指令被配置为为所述第一对象分配第一数量的存储器,并且在所述软件指令集中识别第二分配指令,所述第二分配指令 被配置为为第二对象分配第二量的存储器。 该方法可以包括确定第一分配指令支配第二分配指令,并且响应于确定,将第一分配指令和第二分配指令合并成分配第一量存储器的折叠分配指令和第二分配指令的第二量 内存在单个内存分配操作中。