]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Adjust evrp trapping code to display removal of PHIs.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 10 Jun 2020 15:49:39 +0000 (17:49 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Wed, 10 Jun 2020 16:13:03 +0000 (18:13 +0200)
gcc/misc.cc

index 8a4e358eb6a9f57fdb593c2643b321ebf144e6e6..6c6688b2f1184134b2f0b644d720217960426509 100644 (file)
@@ -76,6 +76,7 @@ void
 highlighter::on (pretty_printer *buffer, int spc, gimple *stmt)
 {
   bool need_header = new_stmt == stmt || untainted_stmt == stmt;
+  bool removal = untainted_stmt == stmt;
   if (need_header)
     {
       pp_string (buffer, ";; (STATE) filename = ");
@@ -88,7 +89,7 @@ highlighter::on (pretty_printer *buffer, int spc, gimple *stmt)
       pp_string (buffer, ";; Original statement was: ");
       pp_gimple_stmt_1 (buffer, old_stmt, spc, TDF_SLIM);
     }
-  else if (untainted_stmt == stmt)
+  else if (removal)
     {
       pp_string (buffer, ";; Queued for removal LHS= ");
       dump_generic_node (buffer, lhs, spc, TDF_SLIM, false);
@@ -99,6 +100,13 @@ highlighter::on (pretty_printer *buffer, int spc, gimple *stmt)
       INDENT (spc);
       pp_string (buffer, ";; VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV\n");
       INDENT (spc);
+      // For PHI removal, dump the PHI as well as the statement.
+      if (removal && is_a<gphi *> (new_stmt))
+       {
+         pp_gimple_stmt_1 (buffer, new_stmt, spc, TDF_SLIM);
+         pp_newline_and_flush (buffer);
+         INDENT (spc);
+       }
     }
 }