public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <richard.guenther@gmail.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	Jason Merrill <jason@redhat.com>, Michael Matz <matz@suse.de>,
	gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for
Date: Mon, 19 Sep 2022 11:16:11 +0200	[thread overview]
Message-ID: <YygzW97u2jbLurPP@tucnak> (raw)
In-Reply-To: <CAFiYyc2x1W5eKM585ePq6CEY4tXDPjhcappjvZdrdH_jHN7n1w@mail.gmail.com>

On Mon, Sep 19, 2022 at 10:57:25AM +0200, Richard Biener wrote:
> For even more uglification and avoiding of the cache effect mentioned below
> we could squeeze the 4 bits into the union members, at least on 64bit platforms
> (probably not on 32bit ones) ...

Maybe, but it would limit the offsets we can represent at least:
The union is
      union {
        _Unwind_Word reg;
        _Unwind_Sword offset;
        const unsigned char *exp;
      } loc;
I guess reg is always pretty small (< 153 or so on most targets), so we
could squeeze the 4 bits in there, offset would need to be multiplied by 16
because we can't rely on all offsets being multiples of 16, and exp
could be through performing aligned allocations for the expression.
That said, while it could save a few bytes and the cache effects, on the
other side, we'd need to clear more bytes.
On x86_64 the size would be 240 bytes instead of 264 bytes, but we'd need
to clear those 240 bytes instead of 120 (ok, unless we want to store just
the bytes containing the 4 bits but then it would be even more stores).

	Jakub


  reply	other threads:[~2022-09-19  9:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19  7:58 Jakub Jelinek
2022-09-19  8:57 ` Richard Biener
2022-09-19  9:16   ` Jakub Jelinek [this message]
2022-09-19  9:25 ` Florian Weimer
2022-09-19  9:33   ` Jakub Jelinek
2022-09-19 13:46     ` Florian Weimer
2022-10-05 10:33 ` Patch ping (Re: [PATCH] libgcc: Decrease size of _Unwind_FrameState and even more size of cleared area in uw_frame_state_for) Jakub Jelinek
2022-10-06  8:08   ` Richard Biener
2022-10-06 22:05     ` Joseph Myers
2022-10-06 22:19       ` [committed] libgcc, arc: Fix build Jakub Jelinek

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=YygzW97u2jbLurPP@tucnak \
    --to=jakub@redhat.com \
    --cc=fweimer@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=matz@suse.de \
    --cc=richard.guenther@gmail.com \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).