Inefficient code generation with -fPIC.
Joe Buck
jbuck@synopsys.COM
Mon Nov 13 12:27:00 GMT 2000
I wrote:
> >If a function specifies throw() and calls other functions, it has to
> >add a handler to catch throws from these other functions, so perhaps
> >this is the source of the extra code. But in this case f() does not
> >call any other functions, so I don't understand why it has an effect here.
Ralph writes:
> The code that adds the handler is at the end of store_parm_decls, and in
> finish_function, both in cp/decl.c. [Always adding it at this stage seems
> reasonable - definitive information as to whether or not it is needed
> presumably won't be available at this stage.]
It used to be that the C++ front end, like the C front end, translated
a statement at a time into RTL. But now we form the whole tree first,
complete with inlining, so more information is available early on (e.g.
whether or not a function is called that might throw).
Since this code is still new, not much has been done to take advantage of it.
But we could do better here.
More information about the Gcc
mailing list