+2018-10-08 Richard Biener <rguenther@suse.de>
+
+ * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
+ Open a dump scope.
+ * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
+ * tree-vectorizer.h (dump_stmt_cost): Adjust.
+ (add_stmt_cost): Dump return value of the hook.
+
2018-10-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/63155
void
dump_stmt_cost (FILE *f, void *data, int count, enum vect_cost_for_stmt kind,
- stmt_vec_info stmt_info, int misalign,
+ stmt_vec_info stmt_info, int misalign, unsigned cost,
enum vect_cost_model_location where)
{
fprintf (f, "%p ", data);
fprintf (f, "%s ", ks);
if (kind == unaligned_load || kind == unaligned_store)
fprintf (f, "(misalign %d) ", misalign);
+ fprintf (f, "costs %u ", cost);
const char *ws = "unknown";
switch (where)
{
}
extern void dump_stmt_cost (FILE *, void *, int, enum vect_cost_for_stmt,
- stmt_vec_info, int, enum vect_cost_model_location);
+ stmt_vec_info, int, unsigned,
+ enum vect_cost_model_location);
/* Alias targetm.vectorize.add_stmt_cost. */
stmt_vec_info stmt_info, int misalign,
enum vect_cost_model_location where)
{
+ unsigned cost = targetm.vectorize.add_stmt_cost (data, count, kind,
+ stmt_info, misalign, where);
if (dump_file && (dump_flags & TDF_DETAILS))
- dump_stmt_cost (dump_file, data, count, kind, stmt_info, misalign, where);
- return targetm.vectorize.add_stmt_cost (data, count, kind,
- stmt_info, misalign, where);
+ dump_stmt_cost (dump_file, data, count, kind, stmt_info, misalign,
+ cost, where);
+ return cost;
}
/* Alias targetm.vectorize.finish_cost. */