摘要 |
One embodiment disclosed presents a framework for performing inline specialization with the aim of improving run-time performance at a low compile-time cost. Given a call-graph, if multiple call-chains in it have at least one common call site, the ability, to inline a common call site in one or more (but not all) of the call-chains, is termed inline specialization. In accordance with an embodiment disclosed, our framework implements this functionality by adding new call sites to the program as and when necessary. This leads to the introduction of a dependence relationship between call sites. An inline analyzer in accordance with the embodiment requires materialization of summary information for these new edges and considers them for inlines. The inline transformation phase uses the dependence relationship to patch up the intermediate representation on the dependent edges before inlining them, if necessary.
|