This is the mail archive of the
mailing list for the GCC project.
Re: DECL_CALL_CLOBBERED tweek
- From: Jan Hubicka <jh at suse dot cz>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org, amacleod at redhat dot com
- Date: Thu, 21 Dec 2006 15:45:48 +0100
- Subject: Re: DECL_CALL_CLOBBERED tweek
- References: <20061221022240.GF20929@kam.mff.cuni.cz> <458A88C1.email@example.com>
> Jan Hubicka wrote on 12/20/06 21:22:
> >* tree.h (DECL_CALL_CLOBBERED): Use variable annotation.
> >(tree_decl_common): Remove call_clobbered_flag. * tree-flow.h
> >(var_ann_d): Add call_clobbered flag.
> What difference does it make if we check the annotation rather than a
> DECL_COMMON field? This doesn't make a lot of sense to me.
The difference is that we have one DECL node for all static variables,
but the annotations are per function. The problem I am running into is
taht compilation of one function clears DECL_CALL_CLOBBERED while
later compilation of another function crash.
This is done by reset_cc_flags pass and I am now starting to wonder why
it is needed at all? What is the semantic of CALL_CLOBBERED on static
variables and why it differs on individual functions? (I can see that
perhaps function that is known to never reach functions that might
clobber the variable might want to have this flag clear unlike other
function that does call something clobbering it. But I am surprised we
do that especially because I've temporarily disabled IPA AA passes for
I will benchmark it on the testcase suggested and prepare version with
inline functions unless we can come with better solution to this
problem. If this flag really needs to be local to functions I am
affraid I don't have better answer than this patch even if it turns out
to be costy :(