Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Scalable compilation and inlining of very large codes

$
0
0

Hi all,

I am using ICC to compile very large programs (think 1GB of code). In order to achieve reasonable compile times I break down my code into small-ish functions artificially, as very large functions will take exponentially more time to compile. This is not nearly enough, so I further split my program into different files with a few thousands of functions each in order to call multiple instances of ICC, each generating its own .o file. Later, a skeleton function calls each of the generated functions and everything is linked together. So, to summarize, I have lots of functions split across multiple files which are later called by a large main().

I am finding that this approach incurs a substantial overhead due to function calling in main(), so I would like to actually inline the calls to the artificial functions I generated. This is a snake biting its own tail: if I do this at the .c level, the problem of exponential compilation time comes back. So I guess I have three questions at this point:

1. Is there anyway to perform link-time inlining, similar to the optimizations provided by GCC LTO? I have been unsuccessful using GCC to link and inline my program so far.

2. If the answer to 1) is yes, can the LTO inlining be forced?

3. And in any case, can anyone think of an approach to achieve scalable compilation and inlining in this type of codes?

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>