[Libre-soc-dev] MVL unclear

Lauri Kasanen cand at gmx.com
Fri May 21 15:13:02 BST 2021

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.

Took a lot of mails ;)

- Lauri

More information about the Libre-soc-dev mailing list