This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH, PR 45934] Devirtualization aware of dynamic type changes


On 11/22/2010 05:05 PM, Martin Jambor wrote:
2) We can never devirtualize according to a type of a global object
because we do not know whether or not the current function has been
(perhaps indirectly) called from its constructor or destructor.  This
also means that we cannot devirtualize according to types of constants
propagated by IPA-CP because those are always global object.
Therefore I removed code paths deriving types from constant IPA-CP
lattices and I check that declarations are not global when extracting
BINFOs from them.

This also means that testcases g++.dg/ipa/ipcp-ivi-1.C and
ivinline-6.C test something which cannot be safely done and therefore
I propose to remove them.

In both of these testcases the call is through main; since main cannot be called directly, the call cannot be within a constructor or destructor. That may not be generally useful, though. :)


Jason


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