This is the mail archive of the 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: DCE enhancement to delete dead vptr assignment

On Fri, Apr 16, 2010 at 9:29 AM, Steven Bosscher <> wrote:
> On Fri, Apr 16, 2010 at 6:09 PM, Xinliang David Li <> wrote:
>> This is related to PR34949. It makes use C++ language semantics.
>> Currently it handles empty dtors or their inline instances into
>> deleting dtors or inline instances into callers followed by delete
>> call. ?It will extend automatically to handle other cases (e.g. dtor
>> with printf statement etc) when more precise alias/mod-ref or builtin
>> function side effect information is available.
>> bootstrap and regression on x86-64/linux
>> Ok for mainline?
> I don't think this is a step in the right direction, in tree-ssa-dce.c:
> + ? ?{
> + ? ? ?/* Initialization of the vptr field for the same object this
> + ? ? ? ? destructor is operating on won't be live out of the function
> + ? ? ? ?if it is not used within the function, so do not treat them
> + ? ? ? ?as a hidden global store. ?*/
> + ? ? ?if (lang_hooks.decls.is_decl_dtor (current_function_decl))
> + ? ? ? ?{

Do you want me to wrap it in a wrapper function?

> We should not be calling lang hooks from the optimizers.
> How would this work with inter-language IPA?

When can the tree structure be flatten out so that there is no
language specific attributes? Until then, what is the solution?
Inter-language IPA? When do we plan to have full support of that?



> Ciao!
> Steven

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