I have been compiling my code for some time with g++ and then moved to Intel's icpc compiler. With icpc I kept getting the following warnings:
remark #11074: Inlining inhibited by limit max-size
remark #11074: Inlining inhibited by limit max-total-size
I never had this problem with g++. After some research, I understood that I can compile with -no-inline-max-total-size and -no-inline-total-size to avoid limits on inlining size. My question is whether it is always a good practice to remove sizes on inlining and inline as much as possible? My code is computation heavy and performance is key, therefore my common sense dictates that I should allow as much inlining as possible for the compiler. Is that true? Are there situations at all where imposing an inlining limit is useful?