[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH] [NFC] Mark locally used symbols as static.
From: |
Taylor Simpson |
Subject: |
RE: [PATCH] [NFC] Mark locally used symbols as static. |
Date: |
Tue, 23 Mar 2021 14:57:47 +0000 |
> -----Original Message-----
> From: Yuri Gribov <tetra2005@gmail.com>
> Sent: Monday, March 22, 2021 2:56 PM
> To: qemu-devel@nongnu.org
> Cc: Richard Henderson <richard.henderson@linaro.org>; Laurent Vivier
> <laurent@vivier.eu>; Philippe Mathieu-Daudé <f4bug@amsat.org>; Chris
> Wulff <crwulff@gmail.com>; David Gibson <david@gibson.dropbear.id.au>;
> Palmer Dabbelt <palmer@dabbelt.com>; Taylor Simpson
> <tsimpson@quicinc.com>; Paolo Bonzini <pbonzini@redhat.com>; Cornelia
> Huck <cohuck@redhat.com>; Max Filippov <jcmvbkbc@gmail.com>; Stefan
> Hajnoczi <stefanha@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 <tsimpson@quicinc.com>
- [PATCH] [NFC] Mark locally used symbols as static., Yuri Gribov, 2021/03/22
- Re: [PATCH] [NFC] Mark locally used symbols as static., Max Filippov, 2021/03/22
- Re: [PATCH] [NFC] Mark locally used symbols as static., David Gibson, 2021/03/22
- Re: [PATCH] [NFC] Mark locally used symbols as static., Stefan Hajnoczi, 2021/03/23
- Re: [PATCH] [NFC] Mark locally used symbols as static., Stefan Hajnoczi, 2021/03/23
- RE: [PATCH] [NFC] Mark locally used symbols as static.,
Taylor Simpson <=
- [PING] [PATCH] [NFC] Mark locally used symbols as static., Yuri Gribov, 2021/03/30