]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Do not record dependences from debug stmts in tail merging
authorRichard Biener <rguenther@suse.de>
Thu, 15 Feb 2024 09:52:09 +0000 (10:52 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 15 Feb 2024 12:43:25 +0000 (13:43 +0100)
The following avoids recording BB dependences for debug stmt uses.

* tree-ssa-tail-merge.cc (same_succ_hash): Skip debug
stmts.

gcc/tree-ssa-tail-merge.cc

index f4e6ae6e8a2a187ab484db421cc3d267a5699de9..c8b4a79294d7aee6c3ca4328991c43360a8c8f7a 100644 (file)
@@ -474,6 +474,9 @@ same_succ_hash (const same_succ *e)
        !gsi_end_p (gsi); gsi_next_nondebug (&gsi))
     {
       stmt = gsi_stmt (gsi);
+      if (is_gimple_debug (stmt))
+       continue;
+
       stmt_update_dep_bb (stmt);
       if (stmt_local_def (stmt))
        continue;