> -----Original Message----- > From: Yuri Gribov <tetra2...@gmail.com> > Sent: Monday, March 22, 2021 2:56 PM > To: qemu-devel@nongnu.org > Cc: Richard Henderson <richard.hender...@linaro.org>; Laurent Vivier > <laur...@vivier.eu>; Philippe Mathieu-Daudé <f4...@amsat.org>; Chris > Wulff <crwu...@gmail.com>; David Gibson <da...@gibson.dropbear.id.au>; > Palmer Dabbelt <pal...@dabbelt.com>; Taylor Simpson > <tsimp...@quicinc.com>; Paolo Bonzini <pbonz...@redhat.com>; Cornelia > Huck <coh...@redhat.com>; Max Filippov <jcmvb...@gmail.com>; Stefan > Hajnoczi <stefa...@redhat.com> > Subject: [PATCH] [NFC] Mark locally used symbols as static. > > Hi all, > > This patch makes locally used symbols static to enable more compiler > optimizations on them. Some of the symbols turned out to not be used > at all so I marked them with ATTRIBUTE_UNUSED (as I wasn't sure if > they were ok to delete). > > The symbols have been identified with a pet project of mine: > https://github.com/yugr/Localizer > > diff --git a/target/hexagon/gen_dectree_import.c > b/target/hexagon/gen_dectree_import.c > index 5b7ecfc..20caee5 100644 > --- a/target/hexagon/gen_dectree_import.c > +++ b/target/hexagon/gen_dectree_import.c > @@ -41,7 +41,7 @@ const char * const opcode_names[] = { > * "Add 32-bit registers", > * { RdV=RsV+RtV;}) > */ > -const char * const opcode_syntax[XX_LAST_OPCODE] = { > +static const char * const opcode_syntax[XX_LAST_OPCODE] = { > #define Q6INSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ > [TAG] = BEH, > #define EXTINSN(TAG, BEH, ATTRIBS, DESCR, SEM) \ > diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c > index 35d790c..586e70d 100644 > --- a/target/hexagon/opcodes.c > +++ b/target/hexagon/opcodes.c > @@ -65,7 +65,7 @@ const char * const opcode_wregs[] = { > #undef IMMINFO > }; > > -const char * const opcode_short_semantics[] = { > +static const char * const opcode_short_semantics[] = { > #define DEF_SHORTCODE(TAG, SHORTCODE) [TAG] = #SHORTCODE, > #include "shortcode_generated.h.inc" > #undef DEF_SHORTCODE
Hexagon changes Reviewed-by: Taylor Simpson <tsimp...@quicinc.com>