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: G++ knowledge of multiple-inheritance class



> 	Is there any way for a GCC port to know that a function call is to
> a multiple-inheritance class?  More specifically, know that a call through
> a virtual function table will be to a thunk (assuming thunks are enabled)
> as opposed to any other indirect call through a pointer?  With this
> knowledge, AIX thunk calls could be much more efficient.

Mike Stump answered "not without complex link-time feedback", which
certainly seems to be the right answer.  Generally, if you can tell it is
a thunk, you can tell the exact function called and can replace the
indirect call with a direct call that bypasses the virtual function table.

Just the same, multiple inheritance isn't that common in C++ code, so I
don't think it's worth expending a lot of effort making it faster; just
make it correct.  The biggest C++ wins are going to come from reducing
the abstraction penalty.




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