public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [HSA, PATCH] Enhance dump output
@ 2016-03-21 11:50 Martin Liška
  2016-03-21 17:44 ` Martin Jambor
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2016-03-21 11:50 UTC (permalink / raw)
  To: GCC Patches; +Cc: Martin Jambor

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

Hello.

Following patch enhances dump output for SBR instructions and
provides a BRIG offset of HSA symbols. The change does not touch any
code generation snippet and I hope it can be installed during the stage4?

Patch can bootstrap on x86_64-linux-gnu and survives
make check-target-libgomp.

Ready for trunk?
Thanks,
Martin

[-- Attachment #2: 0001-HSA-enhance-dump-output.patch --]
[-- Type: text/x-patch, Size: 1236 bytes --]

From f59542322d584a1c61bfbd0148c90671a89d0593 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Tue, 15 Mar 2016 11:57:30 +0100
Subject: [PATCH] HSA: enhance dump output

gcc/ChangeLog:

2016-03-15  Martin Liska  <mliska@suse.cz>

	* hsa-dump.c (dump_hsa_insn_1): dump default branch of SBR
	insns.
	(dump_hsa_symbol): Dump BRIG offset of hsa_symbols.
---
 gcc/hsa-dump.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gcc/hsa-dump.c b/gcc/hsa-dump.c
index c5f1f69..ad0c8bf 100644
--- a/gcc/hsa-dump.c
+++ b/gcc/hsa-dump.c
@@ -721,6 +721,10 @@ dump_hsa_symbol (FILE *f, hsa_symbol *symbol)
 
   if (symbol->m_type & BRIG_TYPE_ARRAY_MASK)
     fprintf (f, "[%lu]", (unsigned long) symbol->m_dim);
+
+
+  if (symbol->m_directive_offset)
+    fprintf (f, "             /* BRIG offset: %u", symbol->m_directive_offset);
 }
 
 /* Dump textual representation of HSA IL operand OP to file F.  */
@@ -929,7 +933,8 @@ dump_hsa_insn_1 (FILE *f, hsa_insn_basic *insn, int *indent)
 	    fprintf (f, ", ");
 	}
 
-      fprintf (f, "]");
+      fprintf (f, "] /* default: BB %i */",
+	       hsa_bb_for_bb (sbr->m_default_bb)->m_index);
     }
   else if (is_a <hsa_insn_arg_block *> (insn))
     {
-- 
2.7.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-03-21 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-21 11:50 [HSA, PATCH] Enhance dump output Martin Liška
2016-03-21 17:44 ` Martin Jambor
2016-03-21 19:55   ` Martin Liška

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).