This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next] [Raw text]

Inlining Decision Priority Function.

• From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
• To: Jan Hubicka <hubicka at ucw dot cz>, Jeff Law <law at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
• Cc: Vinod Kathail <vinodk at xilinx dot com>, Shail Aditya Gupta <shailadi at xilinx dot com>, Vidhumouli Hunsigida <vidhum at xilinx dot com>, "Nagaraju Mekala" <nmekala at xilinx dot com>
• Date: Sat, 12 Sep 2015 08:36:26 +0000
• Subject: Inlining Decision Priority Function.
• Authentication-results: sourceware.org; auth=none
• Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=bestguesspass action=none header.from=xilinx.com;
• Spamdiagnosticoutput: 1:23

```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

```

Index Nav: Message Nav: [Date Index] [Subject Index] [Author Index] [Thread Index] [Date Prev] [Date Next] [Thread Prev] [Thread Next]