Unboxed Tuple in a single STG variable

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Unboxed Tuple in a single STG variable

Csaba Hruska
Hello,

Can an STG variable (Id) store a whole unboxed tuple value?
Or is it required to decompose a returned unboxed value immediately by using an StgCase expression?
If so, then is it correct that the STG variables can store values only from the following types: Addr, Float, Double, Int, Word, Ptr (for boxed values)? (and no multi-value values)

Thanks,
Csaba

_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
Reply | Threaded
Open this post in threaded view
|

Re: Unboxed Tuple in a single STG variable

Ömer Sinan Ağacan
Binders in STG can be bound to multi-values (stuff represented by multiple
values, e.g. unboxed tuples with more than one non-void arguments) initially but
before codegen those need to be eliminated. The pass that does is "unarise", see
GHC.Stg.Unarise module which has lots of notes explaning everything in details.

So CoreToStg generates STG with multi-value binders.
Unarise eliminates those binders, making sure every binder holds one value.

Ömer

Csaba Hruska <[hidden email]>, 20 Oca 2020 Pzt, 13:41
tarihinde şunu yazdı:

>
> Hello,
>
> Can an STG variable (Id) store a whole unboxed tuple value?
> Or is it required to decompose a returned unboxed value immediately by using an StgCase expression?
> If so, then is it correct that the STG variables can store values only from the following types: Addr, Float, Double, Int, Word, Ptr (for boxed values)? (and no multi-value values)
>
> Thanks,
> Csaba
> _______________________________________________
> ghc-devs mailing list
> [hidden email]
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
_______________________________________________
ghc-devs mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs