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: DECL_CALL_CLOBBERED tweek


> 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
now)

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 :(

Honza


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