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]
Other format: [Raw text]

Re: On inlining in C++


> 
> Option 1: a version of GNU C++ that
> 
> * honors the "inline" keyword in all situations where the compiler is
>   capable of inlining the call
> * does the same for functions defined in the class body
> * when -Winline is given, issues a warning and explanation about why
>   a call is not inlined
> * avoids computing any metrics related to inlining decisions (unless -O3)
> 
> Option 2: a version of GNU C++ that uses the smartest heuristics that the
> "ignore inline" advocates can come up with.

Indeed, this is exactly the experiment that is required, and I suspect the
best resolution is to have this controllable by a switch. The issue of
what the best setting for the switch is is another discussion, and for
example depends on how well gdb handles inlining.


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