public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: cgen@sourceware.org
Subject: Re: [PATCH] sim: tighten up generated decode tables
Date: Fri, 22 Dec 2023 14:55:54 -0500	[thread overview]
Message-ID: <ZYXpysSUEdzrPKRt@vapier> (raw)
In-Reply-To: <20231222161209.GC29647@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On 22 Dec 2023 11:12, Frank Ch. Eigler wrote:
> > The use of /* fall through */ with consective case statements doesn't
> > really add any value, and when generating large files, can take up a
> > lot of space.  In the case of cris, it alone adds ~20k, or ~10%.
> 
> A few kilobytes is basically zero cost, isn't it?

you're not necessarily wrong, although i find it easier to read without so
much noise.  i get that it's generated output, but when trying to debug and
understand the steps, having them be a bit readable is helpful.

i'll note that it's ~20k per file.  the sim tree has ~10 of these.  having
these seems like it adds up when using git as everyone has to carry the cost.

it's possible to compress the code even further if i was able to figure out
how the lisp works.  we generate hundreds of case lines that could be shrunk
into 1.  things like:
          case 0:
          case 1:
          case 2:
          case 3:
          case 4:
          case 5:
          case 6:
          case 7:
          case 8:
          case 9:
          case 10:
          case 11:
          case 12:
          case 13:
          case 14: itype = CRISV10F_INSN_ADDOQ; goto extract_sfmt_addoq;
could be:
          case 0 ... 14: itype = CRISV10F_INSN_ADDOQ; goto extract_sfmt_addoq;

some switches have 0 ... 127.
-mike

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-12-22 19:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-22  1:00 Mike Frysinger
2023-12-22 10:55 ` Jose E. Marchesi
2023-12-22 19:58   ` Mike Frysinger
2023-12-23 10:30     ` Jose E. Marchesi
2023-12-22 16:12 ` Frank Ch. Eigler
2023-12-22 19:55   ` Mike Frysinger [this message]
2023-12-22 20:05     ` Frank Ch. Eigler

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=ZYXpysSUEdzrPKRt@vapier \
    --to=vapier@gentoo.org \
    --cc=cgen@sourceware.org \
    --cc=fche@redhat.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).