There's also the question of whether or not the high level simd ops that
llvm exposes are the ones that can be easily supported by the native code
Gen without duplicating llvm specific logic around lowering on various
architectures. Though for the basic horizontal operations that are
currently
Ahh, I see... I finally found the primops, machops, and code generator for x86:
MO_V_Insert {} -> needLlvm
MO_V_Extract {} -> needLlvm
MO_V_Add {} -> needLlvm
MO_V_Sub {} -> needLlvm
...
> The reason this is not available more widely is lack of support
Only programs that use vector primops will generate VecRep's. GHC is not
such a program.
The branch of vector that I modified to use vector primops will generate
VecRep's. You can find it here:
https://github.com/mainland/vector/tree/simd
It uses a modified version of primitive. See here, for
Thanks, I can see the TyCons with VecReps there.. but I still can't see how the
terms are constructed? Can you show me some example programs, or functions in
the compiler, that generate vector terms? (e.g. terms with types with VecReps)
2016-06-07 10:48 GMT-04:00 Geoffrey Mainland
VecRep is used for vector operations. If you aren't using LLVM, you
won't see them.
VecRep's are generated by utils/genprimopcode/Main.hs.
Check out compiler/stage1/build/primop-vector-tys.hs-incl in your build
tree---should be plenty of generated VecRep's there :)
Cheers,
Geoff
On 06/07/2016
I have some code that does things depending on PrimReps of terms and so I have
to handle VecRep there. To understand what VecRep exactly is and how to use it I
looked at its uses, and all I can find was that we have a wired-in DataCon
`vecRepDataCon` which has a type that I thought should have