This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question: Virtual call ellimination with GCC.
- To: kcs at elender dot hu
- Subject: Re: Question: Virtual call ellimination with GCC.
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Tue, 24 Nov 1998 23:06:04 +0100
- CC: egcs at cygnus dot com
- References: <01be1735$a9f20a70$0100007f@csaba>
> Here is a simple test file, compiled by GCC Cygwin-b20 and Watcom 11
> C/C++.
> The resulting files show the Watcom generated code is faster than Gcc, in
> this case.
> I think, the reasons behind the difference is in the difference of virtual
> function handling. ( In other cases, code generated by GCC is better.)
> Does GCC have some option for virtual call optimization?
Not at the moment. If somebody is interested in speeding-up
g++-generated code, virtual-call-elimination would certainly be the
most important item to start with.
Unfortunately, it is not that simple: Once the optimizer starts, all
information about language-level concepts is lost. So all you could
build on is constant propagation. This needs to improve dramatically,
indeed.
Regards,
Martin