<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;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 27, 2016, at 3:05 AM, ジョウェットジェームス via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class="">wanting to build up some language of my own, I have always thought about feeding my compiler output to a C compiler like gcc or clang, however when I learned about (considered using) LLVM IR I immediately thought it could be of some help.<br class=""><br class="">LLVM doesn't seem to be portable though, some people seem to say "If you are generating C then why not go all the way and generate some intermediate representation like LLVM IR?", but what do they mean?<br class=""><br class="">C is like a portable assembly, I just have to check my numeric limits and be careful about portability and it's OK. With LLVM IR I will have to take the target platform into consideration when I compile.<br class=""><br class="">This leads to my second question, what is the true goal of LLVM IR? I feel like some people are disagreeing on this aspect.<br class=""></div></div></blockquote></div><br class=""><div class="">Here is an introduction:</div><div class=""><a href="http://www.aosabook.org/en/llvm.html" class="">http://www.aosabook.org/en/llvm.html</a></div><div class=""><br class=""></div><div class="">It has this to say about generating C code:</div><div class=""><span style="color: rgb(51, 51, 51); font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255);" class="">"Unfortunately, doing this prevents efficient implementation of exception handling, provides a poor debugging experience, slows down compilation, and can be problematic for languages that require guaranteed tail calls (or other features not supported by C)."</span></div><div class=""><br class=""></div><div class="">-Chris</div></body></html>