summaryrefslogtreecommitdiff
path: root/gcc/gimple-pretty-print.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-22 19:18:26 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-22 19:18:26 +0000
commit7fb0cf2de29f45ab9b11292681dc12897698caf6 (patch)
tree79927f8d0c52796f618cd724d2bd9dd9451e0bdb /gcc/gimple-pretty-print.c
parenta344d7efd1cc268835041eed5f39d475eb2699d0 (diff)
downloadgcc-7fb0cf2de29f45ab9b11292681dc12897698caf6.tar.gz
* gimple-pretty-print.c (dump_gimple_tm_atomic_subcode): Merge into...
(dump_gimple_tm_atomic): ... here. Dump OUTER and RELAXED bits. * tree-pretty-print.c (dump_generic_node) [TM_ATOMIC]: Likewise. * gimple.h (GTMA_IS_OUTER, GTMA_IS_RELAXED): New. (GTMA_DECLARATION_MASK): New. (GTMA_HAVE_CALL_TM, GTMA_HAVE_UNCOMMITTED_THROW): Remove. * gimplify.c (gimplify_tm_atomic): Copy OUTER and RELAXED bits. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@153471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-pretty-print.c')
-rw-r--r--gcc/gimple-pretty-print.c63
1 files changed, 32 insertions, 31 deletions
diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c
index d6a2f2576b0..ecc287efb01 100644
--- a/gcc/gimple-pretty-print.c
+++ b/gcc/gimple-pretty-print.c
@@ -1171,31 +1171,6 @@ dump_gimple_omp_return (pretty_printer *buffer, gimple gs, int spc, int flags)
}
}
-/* Dump the subcodes of a GIMPLE_ATOMIC tuple. */
-
-static void
-dump_gimple_tm_atomic_subcode (pretty_printer *buffer, unsigned subcode)
-{
- if (!subcode)
- return;
- pp_string (buffer, " [ ");
- if (subcode & GTMA_HAVE_ABORT)
- pp_string (buffer, "GTMA_HAVE_ABORT ");
- if (subcode & GTMA_HAVE_LOAD)
- pp_string (buffer, "GTMA_HAVE_LOAD ");
- if (subcode & GTMA_HAVE_STORE)
- pp_string (buffer, "GTMA_HAVE_STORE ");
- if (subcode & GTMA_HAVE_CALL_TM)
- pp_string (buffer, "GTMA_HAVE_CALL_TM ");
- if (subcode & GTMA_MAY_ENTER_IRREVOCABLE)
- pp_string (buffer, "GTMA_MAY_ENTER_IRREVOCABLE ");
- if (subcode & GTMA_DOES_GO_IRREVOCABLE)
- pp_string (buffer, "GTMA_DOES_GO_IRREVOCABLE ");
- if (subcode & GTMA_HAVE_UNCOMMITTED_THROW)
- pp_string (buffer, "GTMA_HAVE_UNCOMMITTED_THROW ");
- pp_string (buffer, "]");
-}
-
/* Dump a GIMPLE_TM_ATOMIC tuple on the pretty_printer BUFFER. */
static void
@@ -1209,15 +1184,41 @@ dump_gimple_tm_atomic (pretty_printer *buffer, gimple gs, int spc, int flags)
"%G [SUBCODE=%x,LABEL=%T] <%+BODY <%S> >",
gs, subcode,
gimple_tm_atomic_label (gs), gimple_tm_atomic_body (gs));
- dump_gimple_tm_atomic_subcode (buffer, subcode);
}
else
{
- pp_printf (buffer, "__tm_atomic [SUBCODE=%x,LABEL=", subcode);
- dump_generic_node (buffer, gimple_tm_atomic_label (gs),
- spc, flags, false);
- pp_string (buffer, "]");
- dump_gimple_tm_atomic_subcode (buffer, subcode);
+ pp_string (buffer, "__transaction");
+ if (subcode & GTMA_IS_OUTER)
+ pp_string (buffer, " [[outer]]");
+ else if (subcode & GTMA_IS_RELAXED)
+ pp_string (buffer, " [[relaxed]]");
+ subcode &= ~GTMA_DECLARATION_MASK;
+
+ if (subcode || gimple_tm_atomic_label (gs))
+ {
+ pp_string (buffer, " //");
+ if (gimple_tm_atomic_label (gs))
+ {
+ pp_string (buffer, " LABEL=");
+ dump_generic_node (buffer, gimple_tm_atomic_label (gs),
+ spc, flags, false);
+ }
+ if (subcode)
+ {
+ pp_string (buffer, " SUBCODE=[");
+ if (subcode & GTMA_HAVE_ABORT)
+ pp_string (buffer, "GTMA_HAVE_ABORT ");
+ if (subcode & GTMA_HAVE_LOAD)
+ pp_string (buffer, "GTMA_HAVE_LOAD ");
+ if (subcode & GTMA_HAVE_STORE)
+ pp_string (buffer, "GTMA_HAVE_STORE ");
+ if (subcode & GTMA_MAY_ENTER_IRREVOCABLE)
+ pp_string (buffer, "GTMA_MAY_ENTER_IRREVOCABLE ");
+ if (subcode & GTMA_DOES_GO_IRREVOCABLE)
+ pp_string (buffer, "GTMA_DOES_GO_IRREVOCABLE ");
+ pp_string (buffer, "]");
+ }
+ }
if (!gimple_seq_empty_p (gimple_tm_atomic_body (gs)))
{