> -----Original Message----- > From: Yuri Gribov <[email protected]> > Sent: Monday, March 22, 2021 2:56 PM > To: [email protected] > Cc: Richard Henderson <[email protected]>; Laurent Vivier > <[email protected]>; Philippe Mathieu-Daudé <[email protected]>; Chris > Wulff <[email protected]>; David Gibson <[email protected]>; > Palmer Dabbelt <[email protected]>; Taylor Simpson > <[email protected]>; Paolo Bonzini <[email protected]>; Cornelia > Huck <[email protected]>; Max Filippov <[email protected]>; Stefan > Hajnoczi <[email protected]> > 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 <[email protected]>
