[Libre-soc-dev] MVL unclear

Luke Kenneth Casson Leighton lkcl at lkcl.net
Fri May 21 13:47:59 BST 2021


---
crowd-funded eco-conscious hardware: https://www.crowdsupply.com/eoma68


On Fri, May 21, 2021 at 1:16 PM Lauri Kasanen <cand at gmx.com> wrote:

> On Fri, 21 May 2021 14:58:29 +0300
> Lauri Kasanen <cand at gmx.com> wrote:
>
> > > it's basically absolutely essentlal, and has been a fundamental part
> > > of Cray-style Vectors for decades.
> >
> > Sorry, still not understanding why is it essential. To my reading, it's
> > a completely useless duplication of VL, because you end up calling
> > setvl with VL=MVL every time.
>
> So after looking at it at all angles, all I see is a possible loop
> optimization? Saving a couple instructions in the loop counter setting.
>

and a MASSIVE stupid batch of cleanup instructions at the end.
this article should be read carefully:

https://www.sigarch.org/simd-instructions-considered-harmful/

plus the execution engine can be hit with an astounding number of operations
and the I-Cache and issue sits idle, consuming far less power.



> If you use it to prevent a user-supplied value from overwriting other
> registers, that's just bad design, you need to check user-supplied
> values anyway.
>
> Is this correct?
>

no, sorry :)  it's again fundamentally missing the purpose of setvl.

the entire fundamental design of Cray-style Vectors revolves specifically
and precisely around this:

     VL = RT = min(MVL, RA)

* MVL is the immediate (defining *at compile-time* the maximum that ***
*MIGHT**** be needed)
* VL is the **runtime** quantity which is dynamic and impossible to
determine at compile-time

l.


More information about the Libre-soc-dev mailing list