This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] live analysis on local static functions
- From: law at redhat dot com
- To: Jan Hubicka <jh at suse dot cz>
- Cc: Andrew MacLeod <amacleod at redhat dot com>, gcc mailing list <gcc at gcc dot gnu dot org>, Diego Novillo <dnovillo at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Tue, 14 Oct 2003 10:58:52 -0600
- Subject: Re: [tree-ssa] live analysis on local static functions
- Reply-to: law at redhat dot com
In message <20031014165254.GK6212@kam.mff.cuni.cz>, Jan Hubicka writes:
>> On Tue, 2003-10-14 at 12:10, Jan Hubicka wrote:
>>
>> > so we miss the initializer. I've tracked down the problem to fact that
>> > variable a does not have flag used set in it's annotation. It has, when
>> > I disable the inlining. It is marked in create_ssa_var_map by seeing
>> > VUSE attached to the return statement. With inline enabled the set also
>> > has VUSE but it's operand is not VAR_DECL itself, but SSA_NAME
>> >
>>
>>
>> I assume the useless stmt remover ought to check to see if there is a
>> static initializer in a BIND_EXPR before removing a DECL with an
>> initializer which is not marked used.
>>
>> Either that, or has_hidden_use() ought to be set on A.
>>
>> Neither is true right now.
>>
>> There are other choices too :-)
>
>This is patch I use in my tree. Would be OK to apply it?
>
>Tue Oct 14 18:51:47 CEST 2003 Jan Hubicka <jh@suse.cz>
> * tree-cfg.c (remove-useless_stmts_and_vars_bind): Fix handling of
> local static variables.
I'd rather have a deeper understanding of the problem before applying
this patch.
jeff