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: Remove vtable_method field in cgraph_node


Hi,

On Sun, Apr 17, 2011 at 06:34:59PM +0200, Jan Hubicka wrote:
> Hi,
>
> this patch drops vtable_method filed. I never understood what it is
> about but reading PR20991 I am convinced that we hit the same
> problem with work on new devirutalization code.  I implemented what
> Mark describe as "ideal solution" there - i.e. teaching cgraph that
> virtual functions might become reachable until after inlining.
> Since we still can devirutalize in late compilation (that is pretty
> much poinless but anyway), we no ahve
> can_refer_decl_in_current_unit_p that tests if the function has been
> already thrown away.  Perhaps we might apply there the observation
> about vtable being output somewhere, but I do not think it is safe:
> if vtable is COMDAT, we can pretty much also optimize all references
> to it out in all compilation unit and up not outputting it.  When
> vtable is not COMDAT, the methods won't be either and this trick
> will not apply.
> 
> Consequently I am dropping the flag. This is very trivial based on
> observation that cp_fold_obj_type_ref, the only setter of the flag,
> is now dead. Plus the varasm code is no-longer executed at the time
> of IPA optimizations that the original patch was fixing.
> 
> Martin, can you please look into why cp_fold_obj_type_ref is no
> longer used and if possible get rid of it?

It was needed because of LANG_HOOKS_FOLD_OBJ_TYPE_REF which I removed
last May (revision 159393) and I somehow left the implementation in
place.  I'll take care of removing it.

Thanks,

Martin


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