Patent ID: 9495141
Filing Date: 2016-11-15
CPC Classification: G06F

Claim Text:
1. A method comprising: receiving, by one or more computer processors, an ordered list of inlining options for a computer program and a relational data structure representing dependencies between the inlining options, wherein each inlining option includes an associated cost value and an associated benefit value, and wherein a first plurality of inlining options corresponds to a single function of the computer program; determining, by one or more computer processors, inlining plans for each inlining option of the ordered list, wherein each inlining plan corresponds to a cost budget that is less than or equal to a maximum cost budget, and wherein each inlining plan includes a set of inlining options from the ordered list that provides a maximum combined benefit value for a combined cost value that is equal to or less than the inlining plan's respective cost budget, subject to the following conditions: each inlining option of the set precedes, or is, the inlining plan's respective inlining option in the ordered list, and for each inlining option of the set, the set also includes each inlining option that the respective inlining option is dependent on, as represented by the relational data structure; determining, by one or more computer processors, a maximum-benefit inlining plan for a selected inlining option of the ordered list based, at least in part, on the determined inlining plans and the maximum cost budget, wherein the maximum-benefit inlining plan includes a set of inlining options from the ordered list that includes at least one inlining option of the first plurality of inlining options, and wherein the inlining options of the maximum-benefit inlining plan provide a maximum combined benefit value for a combined cost value that is equal to or less than the maximum cost budget; and performing, by one or more computer processors, inline function expansion for each inlining option of the set of inlining options, including the at least one inlining option of the first plurality of inlining options, according to the determined maximum-benefit inlining plan.