[LLVMdev] Partially complete LLVM backend for the VideoCore 4

David Given dg at cowlark.com
Wed May 28 13:53:37 PDT 2014


Hello,

For a while I've been working on an LLVM backend for Broadcom's
VideoCore 4, the GPU made famous by the Raspberry Pi. This isn't the
QPU, for which Broadcom released docs a little while ago; it's the main
processor, which is a VC4 core.

It's a rather elegant thing with two cores, 32 registers, a built-in DSP
and an extremely nice instruction set; reverse engineered docs (based on
publically available information) are available here:

https://github.com/hermanhermitage/videocoreiv

Right now the backend is incomplete but generates decent code for those
things it does --- 32 bit integer and float, most ALU operations, some
memory operations. It doesn't know about instruction displacements yet
so the generated code probably won't assemble, and it doesn't know about
64 bit integers yet, which means it gets on very badly with LLVM's
autovectoriser.

I was eventually hoping that it would be useful to run programs on the
Raspberry Pi bare metal; I've had success with this using an extremely
crude VC4 code generator for the ACK, but the generated code was
painfully terrible, hence this port.

Unfortunately I've run out of time and probably won't get a chance to
work on this for a while, so if anyone is interested, help yourself:

https://cowlark.com/llvm

-- 
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│
│ "You cannot truly appreciate _Atlas Shrugged_ until you have read it
│ in the original Klingon." --- Sea Wasp on r.a.sf.w

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 876 bytes
Desc: OpenPGP digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140528/87aee89b/attachment.sig>


More information about the llvm-dev mailing list