This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [HSA, PATCH] Enhance dump output
- From: Martin Jambor <mjambor at suse dot cz>
- To: Martin LiÅka <mliska at suse dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 21 Mar 2016 18:44:19 +0100
- Subject: Re: [HSA, PATCH] Enhance dump output
- Authentication-results: sourceware.org; auth=none
- References: <56EFD78B dot 3010707 at suse dot cz>
Hi,
On Mon, Mar 21, 2016 at 12:14:19PM +0100, Martin Liska wrote:
> 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?
yes, but...
>
> Patch can bootstrap on x86_64-linux-gnu and survives
> make check-target-libgomp.
>
> Ready for trunk?
> Thanks,
> Martin
> 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);
> +
> +
...please remove the added newlines here...
> + if (symbol->m_directive_offset)
> + fprintf (f, " /* BRIG offset: %u", symbol->m_directive_offset);
...and I think you are missing an ending "*/" in the string you dump.
> }
>
> /* 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);
I think I've approved this already?
Thanks,
Martin