Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(109)

Issue 5500068: [google] fix ICE when using LIPO profiles for FDO

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by xur
Modified:
13 years, 3 months ago
Reviewers:
davidxl
CC:
gcc-patches_gcc.gnu.org
Base URL:
svn+ssh://gcc.gnu.org/svn/gcc/branches/google/main/
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -0 lines) Patch
M gcc/profile.c View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 2
xur
This patch is for google_main branch only. This patch fixes the ICE when using LIPO ...
13 years, 4 months ago (2011-12-22 00:12:04 UTC) #1
davidxl
13 years, 3 months ago (2011-12-27 07:21:10 UTC) #2
ok for google branches

David

On Wed, Dec 21, 2011 at 4:12 PM, Rong Xu <xur@google.com> wrote:
> This patch is for google_main branch only.
>
> This patch fixes the ICE when using LIPO profiles for regular FDO
> compilation. LIPO has INDIR_CALL_TOPN profiles while FDO has
> INDIR_CALL profile.
>
> Tested with SPEC2000 INT (with -Wno-coverage-mismatch to work around
> the minor pass difference b/w LIPO and FDO)
>
>
> -Rong
>
> 2011-12-21   Rong Xu  <xur@google.com>
>
>        * gcc/profile.c (compute_value_histograms): handle the
>          case when INDIR_CALL counters not available in gcda files.
>
> Index: gcc/profile.c
> ===================================================================
> --- gcc/profile.c       (revision 182415)
> +++ gcc/profile.c       (working copy)
> @@ -828,6 +828,19 @@
>       t = (int) hist->type;
>
>       aact_count = act_count[t];
> +      if (aact_count == 0)
> +        {
> +          /* this can only happen when FDO uses LIPO profiles where
> +             we have HIST_TYPE_INDIR_CALL_TOPN counters in gcda
> +             files.  */
> +          gcc_assert (hist->type == HIST_TYPE_INDIR_CALL);
> +          if (flag_opt_info >= OPT_INFO_MIN)
> +            warning (0, "cannot find INDIR_CALL counters. "
> +                        "Using LIPO profiles?\n",
> +                     DECL_ASSEMBLER_NAME (current_function_decl));
> +          hist->n_counters = 0;
> +          continue;
> +        }
>       act_count[t] += hist->n_counters;
>
>       gimple_add_histogram_value (cfun, stmt, hist);
>
> --
> This patch is available for review at http://codereview.appspot.com/5500068
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b