perlclangllvmllvm-irintermediate-language

Is there an LLVM backend for Perl?


I have a project written in C which I wish to convert to Perl. A friend of mine suggested to use LLVM. I compiled my C code to LLVM assembly using Clang. Now I'm trying to convert this intermediate representation into Perl but I can't seem to find any backend for it. Would someone point me in the right direction?


Solution

    1. No, there isn't such a backend. At least not directly. Emscripten converts LLVM IR to Javascript, and maybe you can use something else to convert that to Perl.
    2. It's a pretty bad idea for moving a project from one language to another. The code will be completely unreadable and un-maintainable. Either do a honest rewrite or wrap your C as a library with Perl's foreign-function interface tools and use it from Perl.