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


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

Re: Inlining heuristics for C++


dewar@gnat.com writes:

> <<to thank you for writing this (I mean that).  I am reassured too, that
> functions marked as inline still WILL be inlined.  If you add point 2)
>>>
> 
> Personally, I don't feel that such reassurance is necessary. Obviously
> a compiler is not required to inline things that are marked as inlined
> (since basically inlining is semantically neutral). It is perfectly
> reasonable for a compiler to take an inlining request as basically
> a request to inline *if* time performance is improved, I think it is
> always fine for a compiler to ignore an inlining request if inlining
> would be detrimental to both time and space performance.

Hopefully, Diego's tree optimizer work will start to clear the way
towards doing smart inlining (based on static or real profiling info).
And for the loop cases, we can do procedure cloning anyway (clone the
procedure to a new name, with the constant arguments set constant, and
make the loop/anything else with those arguments call the new
procedure).




-- 
"I watched the Indy 500, and I was thinking that if they left
earlier they wouldn't have to go so fast.
"-Steven Wright


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