I'm trying to port LLVM to a new architecture. I'm finding that the initial bootstrapping stage of getting something which will build, even if it doesn't work, is complex and rather disheartening --- there's this huge cliff of difficulty in just getting all the boilerplate laid out correctly, before getting to the fun stuff. The other backends are of limited use here because, of course, they're cluttered up with code due to being real backends. So: does anyone have a stub backend I can use as a starting point? Something which only has a few registers, implements no instructions other than the minimum necessary to actually compile an empty function, contains no custom optimisation passes, etc. From there I can start incrementally adding features, testing at each stage. (In addition, if anyone knows of any docs other than 'Writing an LLVM backend' (which is very short on detail) or 'Creating an LLVM backend for the Cpu0 architecture' (which is unfinished), I'd be really interested...) -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ "There does not now, nor will there ever, exist a programming │ language in which it is the least bit hard to write bad programs." --- │ Flon's Axiom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 828 bytes Desc: OpenPGP digital signature URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140302/c225c3de/attachment.sig>
On Sun, Mar 02, 2014 at 12:41:19AM +0000, David Given wrote:> I'm trying to port LLVM to a new architecture. I'm finding that the > initial bootstrapping stage of getting something which will build, even > if it doesn't work, is complex and rather disheartening --- there's this > huge cliff of difficulty in just getting all the boilerplate laid out > correctly, before getting to the fun stuff. The other backends are of > limited use here because, of course, they're cluttered up with code due > to being real backends. > > So: does anyone have a stub backend I can use as a starting point? > Something which only has a few registers, implements no instructions > other than the minimum necessary to actually compile an empty function, > contains no custom optimisation passes, etc. From there I can start > incrementally adding features, testing at each stage. >I am not aware of any stub backends, but I think this would be very useful. Especially if you could just do: sed -i 's/Example/TargetName/g' * and get something that would build. Maybe this would make a good GSOC project. -Tom> (In addition, if anyone knows of any docs other than 'Writing an LLVM > backend' (which is very short on detail) or 'Creating an LLVM backend > for the Cpu0 architecture' (which is unfinished), I'd be really > interested...) > > -- > ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── > │ "There does not now, nor will there ever, exist a programming > │ language in which it is the least bit hard to write bad programs." --- > │ Flon's Axiom >> _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> Maybe this would make a good GSOC project.It's definitely too small project for a GSoC. One can try to start from https://github.com/asl/llvm-openrisc (openrisc branch inside), however, it's already 2 years old... -- With best regards, Anton Korobeynikov Faculty of Mathematics and Mechanics, Saint Petersburg State Universit