[LLVMdev] example of language with vector as first class type

John McCall rjmccall at apple.com
Wed Dec 15 09:06:02 PST 2010


On Dec 15, 2010, at 8:37 AM, Leon Sit wrote:
> Does anyone know any example compiler where it has vector/matrix as first class type like matlab using llvm? If not, does anyone have idea how that should be done on llvm?

Any GCC-compatible frontend — i.e. llvm-gcc, clang, or dragonegg — has vectors as a first-class type.  I wouldn't exactly laud any of GCC's various vector extensions as a sterling example of good language design, but if you're just looking for demonstrations of how to generate vector IR, that's where I'd start.

John.



More information about the llvm-dev mailing list