This is the mail archive of the gcc-bugs@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]

[Bug gcov-profile/34610] [4.3 regression] ICE with "-fprofile-arcs -fopenmp"



------- Comment #6 from hubicka at ucw dot cz  2008-01-04 17:28 -------
Subject: Re:  [4.3 regression] ICE with "-fprofile-arcs -fopenmp"

> +  if (flag_openmp)
> +    {
> +      tree stmt = last_stmt (e->src);
> +      if (stmt)
> +       {
> +         /* Avoid inserting profiling instructions on edges
> +            which OpenMP expand will replace.  */
> +         if (TREE_CODE (stmt) == OMP_CONTINUE
> +             || TREE_CODE (stmt) == OMP_FOR)
> +           return;

Just not inserting the instrumentation would lead to profile mismatch
and strange errors with -fprofile-use or gcov.  Why those edges are not
marked as ABNORMAL when they can not be split? That would drive
profile.c to not instrument them or if we don't want to ABNORMALize them
for some reason (perhaps we want cleanp_cfg to thread them), then checks
for them in profile.c at same time ABRNORMAL edges are handles is right
thing to do.
> +       }
> +    }
> +
>    /* We share one temporary variable declaration per function.  This
>       gets re-set in tree_profiling.  */
>    if (gcov_type_tmp_var == NULL_TREE)
> 
> In addition to this some bit in cfun? to avoid pass_tree_profile would be
> needed
> and expand_omp_parallel should set that for the child fns it creates.

There is already cfun->profile.

Honza


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34610


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