[Libre-soc-dev] MVL unclear
programmerjake at gmail.com
Fri May 21 15:21:55 BST 2021
On Fri, May 21, 2021, 07:11 Lauri Kasanen <cand at gmx.com> wrote:
> On Fri, 21 May 2021 14:17:17 +0100
> Luke Kenneth Casson Leighton <lkcl at lkcl.net> wrote:
> > On Fri, May 21, 2021 at 2:05 PM Lauri Kasanen <cand at gmx.com> wrote:
> > > Which you could ensure by writing a couple of insns to check what
> > > you're setting VL to. Without needing MVL.
> > >
> > exactly. in extremely tight loops that is considered inefficient design,
> > and a waste of instructions when the amount of hardware needed to
> > be added inside setvl to perform the exact same job of the additional
> > 2 to 8 instructions (one of which is a branch) is trivial.
> > in some cases that setup cost could end up exceeding the number
> > of instructions inside the inner loop.
> > people with a hell of a lot of expertise have thought about this for
> > decades.
> So the answer was yes afterall. It is only a loop optimization.
It's only a loop optimization for now, but I'm planning on also using setvl
to choose if 128, 256, 512, 1024, etc. registers are visible for future
architectures where the register file is further expanded. There should be
some reserved must-currently-trap-if-set bits in setvl's encoding for that
More information about the Libre-soc-dev