comparison gcc/hsa-dump.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* Infrastructure to dump our HSAIL IL 1 /* Infrastructure to dump our HSAIL IL
2 Copyright (C) 2013-2017 Free Software Foundation, Inc. 2 Copyright (C) 2013-2018 Free Software Foundation, Inc.
3 Contributed by Martin Jambor <mjambor@suse.cz> and 3 Contributed by Martin Jambor <mjambor@suse.cz> and
4 Martin Liska <mliska@suse.cz>. 4 Martin Liska <mliska@suse.cz>.
5 5
6 This file is part of GCC. 6 This file is part of GCC.
7 7
25 #include "tm.h" 25 #include "tm.h"
26 #include "is-a.h" 26 #include "is-a.h"
27 #include "vec.h" 27 #include "vec.h"
28 #include "tree.h" 28 #include "tree.h"
29 #include "basic-block.h" 29 #include "basic-block.h"
30 #include "function.h"
30 #include "cfg.h" 31 #include "cfg.h"
31 #include "function.h"
32 #include "dumpfile.h" 32 #include "dumpfile.h"
33 #include "gimple-pretty-print.h" 33 #include "gimple-pretty-print.h"
34 #include "cgraph.h" 34 #include "cgraph.h"
35 #include "print-tree.h" 35 #include "print-tree.h"
36 #include "symbol-summary.h" 36 #include "symbol-summary.h"
774 774
775 static void 775 static void
776 dump_hsa_symbol (FILE *f, hsa_symbol *symbol) 776 dump_hsa_symbol (FILE *f, hsa_symbol *symbol)
777 { 777 {
778 const char *name; 778 const char *name;
779 char buf[64];
779 if (symbol->m_name) 780 if (symbol->m_name)
780 name = symbol->m_name; 781 name = symbol->m_name;
781 else 782 else
782 { 783 {
783 char buf[64];
784 sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment), 784 sprintf (buf, "__%s_%i", hsa_seg_name (symbol->m_segment),
785 symbol->m_name_number); 785 symbol->m_name_number);
786 786
787 name = buf; 787 name = buf;
788 } 788 }