Empirical data on ISA design parameters

By: --- (---.delete@this.redheron.com), August 2, 2022 10:25 am
Room: Moderated Discussions
NvaxPlus (spam.delete@this.spam.com) on August 2, 2022 8:45 am wrote:
> I'm curious if anyone here has any good resources (papers, or things of that sort) on empirical
> data about what works and what doesn't in an ISA. It seems to me that a lot of arguments about
> instruction set design rely on intuition and received wisdom. Sometimes that's helpful and sometimes
> it isn't. I've been doing a (admittedly, cursory) literature review on this subject and was
> surprised just how seemingly little publicly available information there is.
>
> When I say "empirical data" I mean specifically things like, how large immediates you
> actually need, what kind branching ops actually get used (i.e. do we need the full
> gamut of integer comparisons, or are equals/does not equal zero enough?), &c.
>
> The question re: immediate size is especially interesting to me. The only real data I could find on
> this is from H&P and as far as I could see they don't really delve into their methodology. What they
> do show suggests that the log2 of immediates is bimodal which kind of intuitively makes sense to me.

The recent data on, eg, branch prediction, show what sort of lengths are *common*. For example fig 3 of https://arxiv.org/pdf/2106.04205.pdf

Of course you need some sort of out for the rare cases that go beyond this, but at that point the usual "aesthetic" considerations kick in, with some people preferring load-type solutions (GOT and so on), others preferring multi-step-creation solutions.

A second issue that is frequently overlooked is that constants are used for different things, with different ranges.
There are at least
- branch offsets
- logical constants
- immediates (eg for adding/subtracting loop counters)
- FP/vector constants.

ARMv8, as the most recent carefully designed ISA (yes, RISC-V is more recent...) seems to have spent some time thinking about all of these, for example they have special patterns for the logicals, and ways to construct both the common branch offsets (short) and a two-step longer branch offset.

One interesting point is that ARMv8 has ways to load a few (I think it's 8?) FP constants as immediates, but M1 does not accelerate these the way they do for integer immediates. Does this mean that they are rarely used? Or does it mean that Apple sees integer latency as an important issue, whereas their FP is optimized for throughput so doing this would be just wasted energy/area? I'm not sure.
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
Empirical data on ISA design parametersNvaxPlus2022/08/02 08:45 AM
  Empirical data on ISA design parameters---2022/08/02 10:25 AM
    Empirical data on ISA design parametersRayla2022/08/02 10:29 AM
  Empirical data on ISA design parametersAnon2022/08/02 11:46 AM
    Empirical data on ISA design parametersAdrian2022/08/03 02:00 AM
      Immediate ranges (was: Empirical data on ISA...)Marcus2022/08/07 10:16 AM
        Immediate ranges (was: Empirical data on ISA...)Björn Ragnar Björnsson2022/08/07 05:14 PM
          Immediate ranges (was: Empirical data on ISA...)Marcus2022/08/07 09:50 PM
  I hope you find something, but there are challengesMark Roulo2022/08/02 06:48 PM
    I hope you find something, but there are challengesBrett2022/08/02 10:41 PM
      I hope you find something, but there are challengeshobold2022/08/03 03:17 AM
        I hope you find something, but there are challengesBrett2022/08/03 11:37 AM
    I hope you find something, but there are challengesvonk2022/08/03 12:22 AM
    I hope you find something, but there are challengesAdrian2022/08/03 02:19 AM
      I hope you find something, but there are challengesNoSpammer2022/08/03 07:55 AM
        I hope you find something, but there are challengesAnon2022/08/03 09:25 AM
          I hope you find something, but there are challengesLinus Torvalds2022/08/03 11:31 AM
          I hope you find something, but there are challengesNoSpammer2022/08/04 03:18 AM
            I hope you find something, but there are challengesAdrian2022/08/04 04:56 AM
              I hope you find something, but there are challengesLinus Torvalds2022/08/04 11:03 AM
                I hope you find something, but there are challengesMr. Camel2022/08/04 12:29 PM
              I hope you find something, but there are challengesNoSpammer2022/08/08 09:31 AM
            I hope you find something, but there are challengesAnon2022/08/04 02:54 PM
        I hope you find something, but there are challengesAdrian2022/08/03 11:33 AM
          I hope you find something, but there are challengesBrett2022/08/03 12:21 PM
          I hope you find something, but there are challenges---2022/08/03 02:55 PM
            I hope you find something, but there are challengesBrett2022/08/03 04:31 PM
              Rebirth of the 68k archBrett2022/08/05 01:17 PM
                Rebirth of the 68k archMarcus2022/08/06 04:36 AM
                  Rebirth of the 68k archMegol2022/08/07 02:01 PM
                    Rebirth of the 68k archMarcus2022/08/07 11:30 PM
                      Rebirth of the 68k archBrett2022/08/08 12:31 AM
                        Rebirth of the 68k archMarcus2022/08/08 01:46 AM
                  Rebirth of the 68k archAnon2022/08/07 02:57 PM
                    Rebirth of the 68k archBrett2022/08/07 05:37 PM
                      68K was not a kludgeMark Roulo2022/08/07 06:05 PM
                        68K was not a kludgeBrett2022/08/07 09:56 PM
                          68K was not a kludgenone2022/08/08 01:00 AM
                            rich man's VAX and more O.T.Michael S2022/08/08 02:44 AM
                              rich man's VAX and more O.T.none2022/08/08 02:51 AM
                Rebirth of the 68k archBrett2022/08/10 11:59 PM
                  Rebirth of the 68k archUngo2022/08/11 03:53 AM
                    Rebirth of the 68k archAnon42022/08/11 12:08 PM
                      Rebirth of the 68k archrwessel2022/08/11 01:02 PM
            I hope you find something, but there are challengesAdrian2022/08/04 12:07 AM
              I hope you find something, but there are challengesEtienne2022/08/04 05:15 AM
          I hope you find something, but there are challengesAnon2022/08/03 05:15 PM
        I hope you find something, but there are challengesblaine2022/08/03 12:03 PM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell tangerine? 🍊