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: [PATCH] Call default_rtl_profile in gimplify_body (PR middle-end/37338)


> Hi!
> 
> gcc.dg/array-init-1.c fails on i?86.  The problem is that
> gimplify_init_constructor calls can_move_by_pieces during gimplification
> time and that function has been changed recently to use
> optimize_insn_for_s{ize,peed}_p ().  During gimplification crtl isn't
> initialized though, crtl->maybe_hot_insn_p is false.
> 
> The following patch initializes crtl->maybe_hot_insn_p to true for
> gimplification.  Honza, is this ok for you or you want to do something
> different?

Yes, this is OK (i.e. I guess best what we can do when we fix this
decision so early), thanks!
Honza
> 
> 2008-09-10  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR middle-end/37338
> 	* gimplify.c (gimplify_body): Call default_rtl_profile.
> 
> --- gcc/gimplify.c.jj	2008-09-09 16:08:04.000000000 +0200
> +++ gcc/gimplify.c	2008-09-10 11:00:48.000000000 +0200
> @@ -7213,6 +7213,10 @@ gimplify_body (tree *body_p, tree fndecl
>  
>    timevar_push (TV_TREE_GIMPLIFY);
>  
> +  /* Initialize for optimize_insn_for_s{ize,peed}_p possibly called during
> +     gimplification.  */
> +  default_rtl_profile ();
> +
>    gcc_assert (gimplify_ctxp == NULL);
>    push_gimplify_context (&gctx);
>  
> 
> 	Jakub


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