Ajit, As a start, look at the Inliner section of Honza's Status of Interprocedural Optimizers presentation from Cauldron 2013.
https://gcc.gnu.org/wiki/cauldron2013?action=AttachFile&do=view&target=Status_of_interprocedural_optimizers.pdf - David On Sat, Sep 12, 2015 at 4:36 AM, Ajit Kumar Agarwal <ajit.kumar.agar...@xilinx.com> wrote: > All: > > Inlining decisions that reduces the formulation of callee's stacks frame and > including the callee in the caller context increases > The performance. > > The priority function of Inlining decisions can be calculated as follows > considering the following. > > 1. Level nest of the callee. > 2. code size of the callee. > 3. code size of the largest function in the program. > > Prority(c) = (level(c) + 1) * largetsize > ----------------------------- > Size(c). > > The the Higher the priority for inlining decision for the callee with small > code size and deepest in the call site of the call graph. > > The deeper the level of callee the greater is the priority and smaller the > code size the higher is the priority. > > The priority function also considers the largest size of the functions in the > program. If the size of the function is largest in the > Program the higher is the prority. > > Priority(c) = Priority of the callee. > Level(c) = Deepness of the callee. > Size(c) = code size of the callee. > Largetsize = largest size among all the functions in the program. > > The above heuristics for inlining should be considered for inlining. If we > use similar heuristics in the inlining decisions Let me know. > > Thanks & Regards > Ajit