[LLVMdev] A Question about LLVM-backend

Duncan Sands baldrick at free.fr
Thu Sep 13 01:57:10 PDT 2012


Hi ์กฐ์˜ํ•„,

 > I want to manipulate LLVM-backend to emit other compiler's IR, in this case,
> VPO's IR.
> So, what i want to know is.. Is there a project to be referred? (For example,
> "Do LLVM-backend -> GIMPLE" project exist?)

as far as I know there is no LLVM IR -> gimple pass.  LLVM used to have a C
backend that turned LLVM IR into C.  I think it was removed in 3.1 already,
because it was buggy and unmaintained, but you can find it in older versions
of LLVM and it may give you some ideas.

> Or, how can I manipulate it easily?

You can write a module pass that iterates over all objects in the module
(global variables, functions etc) and squirts out IR for your other compiler.
That's basically what the C backend did.

Ciao, Duncan.

>
> Thanks,
> Cho Yeong-pil
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list