+2019-05-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/90273
+ * tree-ssa-dce.c (eliminate_unnecessary_stmts): Eliminate
+ useless debug stmts.
+
2019-05-02 Alejandro Martinez <alejandro.martinezvicente@arm.com>
* config/aarch64/aarch64-sve.md (<sur>dot_prod<vsi2qi>): Taken from SVE
bb = h.pop ();
/* Remove dead statements. */
+ auto_bitmap debug_seen;
for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi = psi)
{
stmt = gsi_stmt (gsi);
}
}
if (!dead)
- continue;
+ {
+ bitmap_clear (debug_seen);
+ continue;
+ }
}
if (!is_gimple_debug (stmt))
something_changed = true;
remove_dead_stmt (&gsi, bb, to_remove_edges);
+ continue;
}
else if (is_gimple_call (stmt))
{
break;
}
}
+ else if (gimple_debug_bind_p (stmt))
+ {
+ /* We are only keeping the last debug-bind of a
+ non-DEBUG_EXPR_DECL variable in a series of
+ debug-bind stmts. */
+ tree var = gimple_debug_bind_get_var (stmt);
+ if (TREE_CODE (var) != DEBUG_EXPR_DECL
+ && !bitmap_set_bit (debug_seen, DECL_UID (var)))
+ remove_dead_stmt (&gsi, bb, to_remove_edges);
+ continue;
+ }
+ bitmap_clear (debug_seen);
}
/* Remove dead PHI nodes. */