<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">This is part of the problem with the C backend. This is very much not what it’s useful for, yet it very much looks like it is. The LLVM IR is target dependent, including things like structure layout, pointer size, and other ABI issues. Even with a resurrected C backend, you can’t use it as a substitute for real target support.<div><br></div><div>-Jim</div><div><br><div><blockquote type="cite"><div>On Aug 18, 2014, at 7:02 PM, Bruce Hoult <<a href="mailto:bruce@hoult.org">bruce@hoult.org</a>> wrote:</div><br class="Apple-interchange-newline"><div><div dir="ltr">I don't know how good it is, but the applications seem obvious. e.g. compiling programs in any of a number of original formats to run natively on CPUs that have a working simple C compiler (maybe only K&R or C89) but don't have an LLVM back end.<div>
<br></div><div>The source program could be in modern C, C++, or any other high level language or assembly language with a translator to LLVM.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 19, 2014 at 1:40 PM, Jun Koi <span dir="ltr"><<a href="mailto:junkoi2004@gmail.com" target="_blank">junkoi2004@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Mon, Aug 18, 2014 at 9:18 PM, Carback, Richard T., III <span dir="ltr"><<a href="mailto:rcarback@draper.com" target="_blank">rcarback@draper.com</a>></span> wrote:<br>
</div><div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="EN-US">
<div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas">Hi All,<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">2 of my summer interns (Aimee Dipietro and Greg Simpson) used their time over the summer to resurrect the LLVM C Backend:
<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><a href="https://github.com/draperlaboratory/llvm-cbe" target="_blank">https://github.com/draperlaboratory/llvm-cbe</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">Improvements include recovery of simple for/while loops (instead of goto), better variable naming, inline asm support, and making it work on a more recent version of llvm. I believe they used the repository
here as a starting point:<u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><a href="https://github.com/glycerine/llvm/tree/cbe_revival" target="_blank">https://github.com/glycerine/llvm/tree/cbe_revival</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas"><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-family:Consolas">Feedback is welcomed. I would like to see this feature put back into LLVM, and any help on how to make that happen would be appreciated.</span></p></div></div></blockquote>
<div><br></div></div></div><div>would you mind explaining what this backend is for, and its applications?<br><br></div><div>i guess it is to get the C code at the output of the backend, but dont get why we need it.<br><br>
thanks,<br>
</div><div>Jun<br></div></div></div></div>
<br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>
_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></div></blockquote></div><br></div></body></html>