summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 19:44:46 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2009-07-22 19:44:46 +0000
commitd60ec13d843da3d28b399506b230a144847cd44f (patch)
treeb4c333291033fc15288ea4403ffdc6306efe3cbc
parentd01634019b35e129453f15c3e7b1eacd0296455a (diff)
downloadgcc-d60ec13d843da3d28b399506b230a144847cd44f.tar.gz
* tree-pass.h (TDF_EH): Define.
* gimple-pretty-print.c (dump_gimple_stmt): If FLAGS contains TDF_EH, print the EH region number holding GS. * tree-dump.c (dump_options): Add "eh". * doc/invoke.texi: Document it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149958 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/doc/invoke.texi2
-rw-r--r--gcc/gimple-pretty-print.c7
-rw-r--r--gcc/tree-dump.c1
-rw-r--r--gcc/tree-pass.h2
5 files changed, 20 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 522968000e3..7f3f7561603 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2009-07-22 Diego Novillo <dnovillo@google.com>
+
+ * tree-pass.h (TDF_EH): Define.
+ * gimple-pretty-print.c (dump_gimple_stmt): If FLAGS
+ contains TDF_EH, print the EH region number holding GS.
+ * tree-dump.c (dump_options): Add "eh".
+ * doc/invoke.texi: Document it.
+
2009-07-22 Doug Kwan <dougkwan@google.com>
* config/arm/arm.md (subdi3) Copy non-reg values to DImode registers.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ce94a32ae99..cbef029120c 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -5149,6 +5149,8 @@ Enable showing line numbers for statements.
Enable showing the unique ID (@code{DECL_UID}) for each variable.
@item verbose
Enable showing the tree dump for each statement.
+@item eh
+Enable showing the EH region number holding each statement.
@item all
Turn on all options, except @option{raw}, @option{slim}, @option{verbose}
and @option{lineno}.
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index c6f0c658361..1deb9c81a0a 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1384,6 +1384,13 @@ dump_gimple_stmt (pretty_printer *buffer, gimple gs, int spc, int flags)
pp_string (buffer, "] ");
}
+ if (flags & TDF_EH)
+ {
+ int eh_region = lookup_stmt_eh_region_fn (cfun, gs);
+ if (eh_region >= 0)
+ pp_printf (buffer, "[EH #%d] ", eh_region);
+ }
+
if ((flags & (TDF_VOPS|TDF_MEMSYMS))
&& gimple_has_mem_ops (gs))
dump_gimple_mem_ops (buffer, gs, spc, flags);
diff --git a/gcc/tree-dump.c b/gcc/tree-dump.c
index 1cb650442b7..61ccc6ce792 100644
--- a/gcc/tree-dump.c
+++ b/gcc/tree-dump.c
@@ -816,6 +816,7 @@ static const struct dump_option_value_info dump_options[] =
{"stmtaddr", TDF_STMTADDR},
{"memsyms", TDF_MEMSYMS},
{"verbose", TDF_VERBOSE},
+ {"eh", TDF_EH},
{"all", ~(TDF_RAW | TDF_SLIM | TDF_LINENO | TDF_TREE | TDF_RTL | TDF_IPA
| TDF_STMTADDR | TDF_GRAPH | TDF_DIAGNOSTIC | TDF_VERBOSE
| TDF_RHS_ONLY)},
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h
index a68cb16350b..bc1ebda9a50 100644
--- a/gcc/tree-pass.h
+++ b/gcc/tree-pass.h
@@ -76,6 +76,8 @@ enum tree_dump_index
#define TDF_RHS_ONLY (1 << 17) /* a flag to only print the RHS of
a gimple stmt. */
#define TDF_ASMNAME (1 << 18) /* display asm names of decls */
+#define TDF_EH (1 << 19) /* display EH region number
+ holding this gimple statement. */
/* In tree-dump.c */