RFC: New C++ Attribute: final
Richard Henderson
rth@redhat.com
Wed Mar 3 00:33:00 GMT 2004
On Tue, Mar 02, 2004 at 04:21:44PM -0800, Dale Johannesen wrote:
> There are wins to be had by analyzing indirect calls in C,
> also, for example on the gap SPECmark. What you want to do there is
> find the hot indirect calls and the hot calls that actually get made
> via feedback, and pull out the common cases and inline them.
Yes, but that's irrelevant to matching up CALL_EXPR with
"type of object being called", and thence to "which function
must be invoked".
Basically, we'd rather not hard-code vtable layout specifics
in the language-independant optimizer. What we'd rather do
is deduce the object being referenced, then pass the whole
mass back to the language and say "hey, can you guess what's
going on here?"
Given that, I'd think
<METHOD_CALL_EXPR
<object expression>
<lang-specific method token>>
<args>>
is easier to manipulate than
<CALL_EXPR
<addr_expr <function_decl>>
<args>>
and then you have to pull out the object from the first or
second argument of the list, depending on the signature of
the function.
r~
More information about the Gcc
mailing list