发明名称 Conditional stack frame allocation
摘要 A method for allocating memory includes an operation that determines whether a prototype of a callee function is within a scope of a caller. The caller is a module containing a function call to the callee function. In addition, the method includes determining whether the function call includes one or more unnamed parameters when a prototype of the callee function is within the scope of the caller. Further, the method may include inserting instructions in the caller to allocate a register save area in a memory when it is determined that the function call includes one or more unnamed parameters.
申请公布号 US9552158(B2) 申请公布日期 2017.01.24
申请号 US201414568404 申请日期 2014.12.12
申请人 International Business Machines Corporation 发明人 Gschwind Michael Karl;McIntosh Ronald I.;Weigand Ulrich
分类号 G06F9/44;G06F3/06;G06F9/45;G06F9/50 主分类号 G06F9/44
代理机构 代理人 Shatto Robert J.
主权项 1. A computer-implemented method for allocating memory, comprising: determining whether a prototype of a callee function is within a scope of a caller, the caller being a module containing a function call to the callee function; when the prototype of the callee function is not within the scope of the module, inserting instructions in the caller to allocate a register save area in a memory; when the prototype of the callee function is within the scope of the caller, determining whether the function call includes one or more unnamed parameters; inserting instructions in the caller to allocate the register save area in the memory when it is determined that the function call includes one or more unnamed parameters; determining whether all parameters of the function can be passed in registers; and inserting instructions in the caller to allocate a parameter overflow area in the memory when all parameters of the function call cannot be passed in registers.
地址 Armonk NY US