yocto llvm clang for epiphany?

Moderator: Hoernchen

yocto llvm clang for epiphany?

Postby peteasa » Thu Mar 02, 2017 10:16 am

Hi,

Just wondered if anyone is interested in using llvm in a yocto environment as an alternative to e-gcc. Now that an Epiphany backend is in progress thanks to @upcFrost (https://github.com/upcFrost/Epiphany - viewtopic.php?f=23&t=3966&p=18474&sid=413db2c74d20953d31d614cc52e73960#p18474) I am considering what it would take to bring this into the yocto environment (see https://layers.openembedded.org/layerin ... eta-clang/).

It seems that progress on improving support for multiple cores for Epiphany or other multi core processors will likely go hand in hand with tools using llvm to create code. From my point of view I think that the construction and optimization of the DAG for Epiphany needs to take into account the small memory size. Not sure how this is achieved but it seem like a area of development that might be of use. Using yocto allows an x86 build machine to be used to build the llvm / clang tools.

Peter.
User avatar
peteasa
 
Posts: 116
Joined: Fri Nov 21, 2014 7:04 pm

Re: yocto llvm clang for epiphany?

Postby peteasa » Sun Mar 05, 2017 5:57 pm

Hi,

Found https://dragonegg.llvm.org/ where fortran could be compiled with LLVM and then use the new epiphany backend to output code for Epiphany cores... Fortran compiler for Epiphany with the latest optimization etc provided by llvm!

Peter.
User avatar
peteasa
 
Posts: 116
Joined: Fri Nov 21, 2014 7:04 pm

Re: yocto llvm clang for epiphany?

Postby upcFrost » Tue Mar 28, 2017 3:24 pm

Hi,

Won't it be easier to just use LLVM's own frontend? For Fortran there's a couple of those iirc (like FLang). Once the backend will get to the public alpha stage, i'll try to make packages for the major distros with all frontends i'll find.
But anyway, if you have some test files to share (as .ll with LLVM IR code) - it'd be great.

From my point of view I think that the construction and optimization of the DAG for Epiphany needs to take into account the small memory size

That's a very big problem, tbh. Having 16-bit versions of 32-bit instructions is good, but the register pressure becomes huge. Also, as R4-R7 are callee-saved, using them in small functions will only waste a bunch of cycles. I'll try to make an optimization pass for this after finishing 64-bit extension and hardware loops (because they look tasty)

BR,
Petr

p.s. saw OpenEmbedded in the URL, got goosebumps. Still remember how i was playing around with linux kernel for arm when android was yet to be released.
Current LLVM backend for Epiphany: https://github.com/upcFrost/Epiphany. Commits and code reviews are welcome
upcFrost
 
Posts: 29
Joined: Wed May 28, 2014 6:37 am
Location: Moscow, Russia


Return to LLVM Compiler

Who is online

Users browsing this forum: No registered users and 2 guests

cron