
21 May
2015
21 May
'15
9:05 a.m.
Virtual function can't be inlined (AFAIK). That was original request, but it require too much changes for 10.1
I am not sure that it is _so_ clever with virtual functions even if knows basic type because of possible inheritance and re-implementinmg (also can be checked by compiler, but again I am not sure)
Recent GCC versions have a devirtualization pass, followed by inlining: -fdevirtualize Attempt to convert calls to virtual functions to direct calls. This is done both within a procedure and interprocedurally as part of indirect inlining (-findirect-inlining) and interprocedural constant propagation (-fipa-cp). Enabled at levels -O2, -O3, -Os. I don't know whether it helps here or not. -- Laurynas