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: Fix latent bug in add_referenced_vars


Jan Hubicka wrote:

	* tree-dfa.c (add_referenced_var): Don't walk initializer of external
	and non-constant public variables.

OK with the changes below.

!       if (DECL_INITIAL (var)
! 	  /* Initializers of external variables are used solely by frontends
! 	     and serve no usefull value for us.  */
"are not useful to the optimizers."

!           && !DECL_EXTERNAL (var)
! 	  /* Only reason why we need to walk the initializer is possibility
! 	     of constant folding the variable usage into that value.  This
! 	     never happen for public non-constant functions since those can
! 	     never be proved to still contain the value they are initialized
! 	     to.  */
Please rephrase. It's not clear what you are trying to say here.


Diego.



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