qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PING^2] [PATCH] [NFC] Mark locally used symbols as static.


From: Palmer Dabbelt
Subject: Re: [PING^2] [PATCH] [NFC] Mark locally used symbols as static.
Date: Thu, 15 Apr 2021 22:08:37 -0700 (PDT)

On Thu, 15 Apr 2021 10:27:42 PDT (-0700), tetra2005@gmail.com wrote:
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

Link to patch: 
https://patchew.org/QEMU/CAJOtW+5DDMsr8QJQxaa1OHT79rpMJCrwkYbuaRTynR_ngUxgHA@mail.gmail.com/

From 4e790fd06becfbbf6fb106ac52ae1e4515f1ac73 Mon Sep 17 00:00:00 2001
From: Yury Gribov <tetra2005@gmail.com>
Date: Sat, 20 Mar 2021 23:39:15 +0300
Subject: [PATCH] Mark locally used symbols as static.

Signed-off-by: Yury Gribov <tetra2005@gmail.com>
Acked-by: Max Filippov <jcmvbkbc@gmail.com> (xtensa)
Acked-by: David Gibson <david@gibson.dropbear.id.au> (ppc)
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> (tracetool)
Reviewed-by: Taylor Simpson <tsimpson@quicinc.com> (hexagon)
---
 disas/alpha.c                                 | 16 ++--
 disas/m68k.c                                  | 78 ++++++++---------
 disas/mips.c                                  | 14 ++--
 disas/nios2.c                                 | 84 +++++++++----------
 disas/ppc.c                                   | 26 +++---
 disas/riscv.c                                 |  2 +-
 pc-bios/optionrom/linuxboot_dma.c             |  4 +-
 scripts/tracetool/format/c.py                 |  2 +-
 target/hexagon/gen_dectree_import.c           |  2 +-
 target/hexagon/opcodes.c                      |  2 +-
 target/i386/cpu.c                             |  2 +-
 target/s390x/cpu_models.c                     |  2 +-
 .../xtensa/core-dc232b/xtensa-modules.c.inc   |  2 +-
 .../xtensa/core-dc233c/xtensa-modules.c.inc   |  2 +-
 target/xtensa/core-de212/xtensa-modules.c.inc |  2 +-
 .../core-de233_fpu/xtensa-modules.c.inc       |  2 +-
 .../xtensa/core-dsp3400/xtensa-modules.c.inc  |  2 +-
 target/xtensa/core-fsf/xtensa-modules.c.inc   |  2 +-
 .../xtensa-modules.c.inc                      |  2 +-
 .../core-test_kc705_be/xtensa-modules.c.inc   |  2 +-
 .../core-test_mmuhifi_c3/xtensa-modules.c.inc |  2 +-
 21 files changed, 125 insertions(+), 127 deletions(-)

You might have better luck splitting these sorts of things up: when there's a patch that touches a bunch of different trees it can be unclear who is going to merge it, which is frequently how these sorts of things get lost.

diff --git a/disas/riscv.c b/disas/riscv.c
index 278d9be924..0d124d8b61 100644
--- a/disas/riscv.c
+++ b/disas/riscv.c
@@ -789,7 +789,7 @@ static const rv_comp_data rvcp_fsgnjx_q[] = {

 /* instruction metadata */

-const rv_opcode_data opcode_data[] = {
+static const rv_opcode_data opcode_data[] = {
     { "illegal", rv_codec_illegal, rv_fmt_none, NULL, 0, 0, 0 },
     { "lui", rv_codec_u, rv_fmt_rd_imm, NULL, 0, 0, 0 },
     { "auipc", rv_codec_u, rv_fmt_rd_offset, NULL, 0, 0, 0 },

Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com> (RISC-V)

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]