<html><head><base href="x-msg://4/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 7, 2011, at 7:42 AM, Michael Clagett wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr">Wondering if you've gotten any further answering the question you pose below?<br><br>I also am interested in being able to generate a JVM backend, but not departing, as you are, from coding in java itself, but rather as a means to integrate my own custom vm with Java and be able to produce and consume java code easily from my custom environment.<br></div></div></span></blockquote><div><br></div><div>LLVM doesn't produce Java code today, and it isn't especially well suited for this.</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><br>Just curios if you made any progress answering this question for yourself and the final one you pose: "Is LLVM for me?"<br></div></div></span></blockquote><div><br></div>The answer to "Is LLVM for me?" depends on what you're looking to do. In your case, we</div><div>have few details to go on here, but it sounds like you're already pretty Java-oriented, so</div><div>sticking with Java might be a good idea.</div><div><br></div><div>Responding to the earlier email:</div><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><pre>Sorry if I'm repeating something that was already said.<br><br>I was just thinking "why the heck do I seem headed for JVM generation if <br>what I want to use is LLVM", and this is the result:<br><br>I'm coming from a Java background. I'm using Eclipse, I'm used to the <br>syntax highlighting, cross referencing and refactoring support that <br>Eclipse offers.<br>I know I will want to have the same infrastructure for my language, and <br>I want it written in my language. I WILL need a JVM backend, no matter what.<br><br>Now, I'd still love to use LLVM. It has a lot to offer for the phases <br>"above" code generation. I don't need register allocation, but I'd like <br>to make use of common constant elimination, loop unrolling, inlining, or <br>the pass management infrastructure; that's a whole lot of code I don't <br>need to write.<br>And when it comes to generating raw machine code, I can confidently say: <br>develop in Eclipse and run the stuff as JVM code, but deploy using the <br>machine-code backend provided by LLVM.<br></pre></div></div></span></blockquote><div>If you're looking for a way to develop in Java and then compile to native code, consider the</div><div>many Java-to-native-code compilers out there. Many of them include optimizations like</div><div>loop unrolling and inlining. LLVM is probably not the best tool here.</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div class="hmmessage" style="font-size: 10pt; font-family: Tahoma; "><div dir="ltr"><pre><br>So my conclusion is:<br>To make LLVM attractive for us Java-based language designers, we need <br>the means to write a JVM backend.<br></pre></div></div></span></blockquote><div>Translating from Java to LLVM IR and then back to Java would probably not be very</div><div>practical. If you're a "Java-based language designer" to begin with, and you want to</div><div>run your programs in the JVM, it's probably best to just stick with Java the whole way.</div><div><br></div><div>Dan</div><div><br></div></div></body></html>