This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Function outlining and partial Inlining
- From: Ajit Kumar Agarwal <ajit dot kumar dot agarwal at xilinx dot com>
- To: "hubicka at ucw dot cz" <hubicka at ucw dot cz>, "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: Thu, 12 Feb 2015 13:46:19 +0000
- Subject: Function outlining and partial Inlining
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=pass (sender IP is 149.199.60.83) smtp dot mailfrom=ajit dot kumar dot agarwal at xilinx dot com;
Hello All:
The large functions are the important part of high performance application. They contribute to performance bottleneck with many
respect. Some of the large hot functions are frequently executed but many regions inside the functions are cold regions. The large
Function blocks the function inlining to happen before of the code size constraints.
Such cold regions inside the hot large functions can be extracted out and form the function outlining. Thus breaking the large functions
Into smaller function segments which causes the functions to be inlined at the caller site or helps in partial inlining.
LLVM Compiler has the functionality and the optimizations for function outlining based on regions like basic blocks, superblocks and
Hyperblocks which gets extracted out into smaller function segments and thus enabling the partial inlining and function inlining to happen
At the caller site.
This optimization is the good case of profile guided optimizations and based on the profile feedback data by the Compiler.
Without profile information the above function outlining optimizations will not be useful.
We are doing lot of optimization regarding polymorphism and also the indirect icall promotion based on the profile feedback on the
Callgraph profile.
Are we doing the function outlining optimization in GCC with respect to function inline and partial inline based on profile feedback
Data. If not this optimization can be implemented. If already implemented in GCC Can I know any pointer for such code in GCC and the
Scope of this function outlining optimization.
If not implemented , Can I propose to have the optimization like function outlining in GCC.
Thoughts Please?
Thanks & Regards
Ajit