qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
To: Richard Henderson <rth@twiddle.net>, qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PATCH 0/5] Use tcg_malloc more
Date: Mon, 16 Feb 2015 16:01:29 +0000	[thread overview]
Message-ID: <54E21459.3050404@mail.uni-paderborn.de> (raw)
In-Reply-To: <1423883536-6809-1-git-send-email-rth@twiddle.net>


On 02/14/2015 03:12 AM, Richard Henderson wrote:
> We have several statically sized arrays attached to the TCGContext
> structure.  For the most part, these arrays are sized unreasonably
> large -- there are rarely more than 3 labels in a TB, or more than
> a few dozen memory operations.
>
> We already have tcg_malloc, which manages a pooled allocator attached
> to the TCGContext.  We can easily use this to dynamically allocate
> both of the structures mentioned above.  This both minimizes the memory
> that we do use, and also eliminates some arbitrary limits.
>
> In order to convert TCGLabel, we need to stop referencing them via
> indicies in an array and instead manipulate them via pointers.  This
> is mechanical but pervasive, touching all front ends and all back ends.
>
>
> r~
>
>
> Richard Henderson (5):
>    tcg: Use tcg_malloc to allocate TCGLabelQemuLdst
>    tcg-ia64: Use tcg_malloc to allocate TCGLabelQemuLdst
>    tcg: Change translator-side labels to a pointer
>    tcg: Change generator-side labels to a pointer
>    tcg: Use tcg_malloc to allocate TCGLabel
>
>   include/exec/gen-icount.h     |   4 +-
>   target-alpha/translate.c      |   4 +-
>   target-arm/translate-a64.c    |  26 ++++-----
>   target-arm/translate.c        |   8 +--
>   target-arm/translate.h        |   4 +-
>   target-cris/translate.c       |  23 +++-----
>   target-cris/translate_v10.c   |   6 +--
>   target-i386/translate.c       |  33 ++++++------
>   target-lm32/translate.c       |  20 ++++---
>   target-m68k/translate.c       |   8 +--
>   target-microblaze/translate.c |  12 ++---
>   target-mips/translate.c       |  94 ++++++++++++++++----------------
>   target-moxie/translate.c      |   2 +-
>   target-openrisc/translate.c   |  34 ++++++------
>   target-ppc/translate.c        | 123 ++++++++++++++++++++----------------------
>   target-s390x/translate.c      |   7 +--
>   target-sh4/translate.c        |  22 ++++----
>   target-sparc/translate.c      |  11 ++--
>   target-tricore/translate.c    |   6 +--
>   target-unicore32/translate.c  |   6 +--
>   target-xtensa/translate.c     |  18 +++----
>   tcg/aarch64/tcg-target.c      |  15 +++---
>   tcg/arm/tcg-target.c          |  14 ++---
>   tcg/i386/tcg-target.c         |  72 ++++++++++++-------------
>   tcg/ia64/tcg-target.c         |  35 ++++++------
>   tcg/mips/tcg-target.c         |  17 +++---
>   tcg/ppc/tcg-target.c          |  20 ++++---
>   tcg/s390/tcg-target.c         |  31 +++++------
>   tcg/sparc/tcg-target.c        |  22 ++++----
>   tcg/tcg-be-ldst.h             |  26 +++++----
>   tcg/tcg-op.c                  |  25 ++++-----
>   tcg/tcg-op.h                  |  19 +++----
>   tcg/tcg.c                     |  45 ++++++++--------
>   tcg/tcg.h                     |  34 ++++++++++--
>   tcg/tci/tcg-target.c          |  13 +++--
>   35 files changed, 417 insertions(+), 442 deletions(-)
>
Reviewed-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>

Nicely done. This makes me wonder, if it's worth it to remove the hard 
limit for tcg temps too.

Cheers,
Bastian

      parent reply	other threads:[~2015-02-16 15:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-14  3:12 [Qemu-devel] [PATCH 0/5] Use tcg_malloc more Richard Henderson
2015-02-14  3:12 ` [Qemu-devel] [PATCH 1/5] tcg: Use tcg_malloc to allocate TCGLabelQemuLdst Richard Henderson
2015-02-14  3:12 ` [Qemu-devel] [PATCH 2/5] tcg-ia64: " Richard Henderson
2015-02-14  3:12 ` [Qemu-devel] [PATCH 3/5] tcg: Change translator-side labels to a pointer Richard Henderson
2015-02-14  3:12 ` [Qemu-devel] [PATCH 4/5] tcg: Change generator-side " Richard Henderson
2015-02-14 12:26   ` Claudio Fontana
2015-02-14  3:12 ` [Qemu-devel] [PATCH 5/5] tcg: Use tcg_malloc to allocate TCGLabel Richard Henderson
2015-02-16 16:01 ` Bastian Koppelmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54E21459.3050404@mail.uni-paderborn.de \
    --to=kbastian@mail.uni-paderborn.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).