aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAldy Hernandez <aldyh@redhat.com>2020-06-10 17:49:39 +0200
committerAldy Hernandez <aldyh@redhat.com>2020-06-10 18:13:03 +0200
commit71920b87f77a16d35d99717d09345274c0d6d71d (patch)
tree8d96997e66fc90653309460d20416b1e9aa66267
parente09c42b8a4ce917dc3a2d89b76a9bd25b4d55eb3 (diff)
downloadgcc-71920b87f77a16d35d99717d09345274c0d6d71d.zip
gcc-71920b87f77a16d35d99717d09345274c0d6d71d.tar.gz
gcc-71920b87f77a16d35d99717d09345274c0d6d71d.tar.bz2
Adjust evrp trapping code to display removal of PHIs.
-rw-r--r--gcc/misc.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/misc.cc b/gcc/misc.cc
index 8a4e358..6c6688b 100644
--- a/gcc/misc.cc
+++ b/gcc/misc.cc
@@ -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);
+ }
}
}