On 13/09/12 10:57, Duncan Sands wrote:> 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. >For those that are interested, I can provide a patch to the current trunk which provides a working version of the C backend. So far this patch just takes the parts that were removed and updates them to the current infrastructure.>> 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 >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Hi Roel, On 13/09/12 11:02, Roel Jordans wrote:> > For those that are interested, I can provide a patch to the current > trunk which provides a working version of the C backend. So far this > patch just takes the parts that were removed and updates them to the > current infrastructure. >Yes please! I've been looking at the C backend recently with a view towards seeing if it can be adapted into a Javascript backend - it would be extremely helpful for me to work with a version that runs on the latest llvm. Cheers, David.
For those wondering about the C backend, a patch(set) to current trunk is available but too large to send through the LLVM mailinglist. I can send the patch(es) directly if people are interested. Cheers, Roel On 17/11/12 03:48, David Claughton wrote:> Hi Roel, > > On 13/09/12 11:02, Roel Jordans wrote: >> >> For those that are interested, I can provide a patch to the current >> trunk which provides a working version of the C backend. So far this >> patch just takes the parts that were removed and updates them to the >> current infrastructure. >> > > Yes please! I've been looking at the C backend recently with a view > towards seeing if it can be adapted into a Javascript backend - it would > be extremely helpful for me to work with a version that runs on the > latest llvm. > > Cheers, > > David. > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >