t = GCOV_COUNTER_V_DELTA;
break;
+ case HIST_TYPE_INDIR_CALL:
+ t = GCOV_COUNTER_V_INDIR;
+ break;
+
+ case HIST_TYPE_AVERAGE:
+ t = GCOV_COUNTER_AVERAGE;
+ break;
+
+ case HIST_TYPE_IOR:
+ t = GCOV_COUNTER_IOR;
+ break;
+
default:
gcc_unreachable ();
}
(profile_hooks->gen_const_delta_profiler) (hist, t, 0);
break;
+ case HIST_TYPE_INDIR_CALL:
+ (profile_hooks->gen_ic_profiler) (hist, t, 0);
+ break;
+
+ case HIST_TYPE_AVERAGE:
+ (profile_hooks->gen_average_profiler) (hist, t, 0);
+ break;
+
+ case HIST_TYPE_IOR:
+ (profile_hooks->gen_ior_profiler) (hist, t, 0);
+ break;
+
default:
gcc_unreachable ();
}
{
histogram_value hist = VEC_index (histogram_value, values, i);
tree stmt = hist->hvalue.stmt;
- stmt_ann_t ann = get_stmt_ann (stmt);
t = (int) hist->type;
aact_count = act_count[t];
act_count[t] += hist->n_counters;
- hist->hvalue.next = ann->histograms;
- ann->histograms = hist;
+ gimple_add_histogram_value (cfun, stmt, hist);
hist->hvalue.counters = XNEWVEC (gcov_type, hist->n_counters);
for (j = 0; j < hist->n_counters; j++)
hist->hvalue.counters[j] = aact_count[j];
if (EXPR_HAS_LOCATION (stmt))
output_location (EXPR_FILENAME (stmt), EXPR_LINENO (stmt),
&offset, bb);
+ /* Take into account modify statements nested in return
+ produced by C++ NRV transformation. */
+ if (TREE_CODE (stmt) == RETURN_EXPR
+ && TREE_OPERAND (stmt, 0)
+ && TREE_CODE (TREE_OPERAND (stmt, 0)) == MODIFY_EXPR
+ && EXPR_HAS_LOCATION (TREE_OPERAND (stmt, 0)))
+ output_location (EXPR_FILENAME (TREE_OPERAND (stmt, 0)),
+ EXPR_LINENO (TREE_OPERAND (stmt, 0)),
+ &offset, bb);
}
/* Notice GOTO expressions we eliminated while constructing the