Reid Spencer wrote:>Yes, that's right! > >In fact, shortly the process of doing that will get easier with the >llvmc (compiler driver) tool that I'm working on. You write your >compiler to generate either bytecode or LLVM assembly and a > >Does that mean the front end must decide between emiting bytecode for interpretting/JITing and LLVM assembly for native compilation? You can't emit the one kind of output for either end target (interpretted bytecode or native compilation)?>configuration file. The rest of it (optimization, linking, codegen) can >be done with existing LLVM tools. If you later want to include those >features in your compiler, you can (via the C++ interface) and just >reconfigure your compiler's configuration file. > >Welcome to LLVM, Peter! > >Thanks :o)
On Thu, Aug 19, 2004 at 10:35:02AM +1200, Peter Ashford wrote:> Does that mean the front end must decide between emiting bytecode for > interpretting/JITing and LLVM assembly for native compilation? You > can't emit the one kind of output for either end target (interpretted > bytecode or native compilation)?Not at all, there's only one version of LLVM IR, but it can appear in binary bytecode or textual form (human-readable). They have a one-to-one correlation. There is an assembler (llvm-as) and disassembler (llvm-dis) for translating between the two formats. -- Misha Brukman :: http://misha.brukman.net :: http://llvm.cs.uiuc.edu
Misha Brukman wrote:>On Thu, Aug 19, 2004 at 10:35:02AM +1200, Peter Ashford wrote: > > >>Does that mean the front end must decide between emiting bytecode for >>interpretting/JITing and LLVM assembly for native compilation? You >>can't emit the one kind of output for either end target (interpretted >>bytecode or native compilation)? >> >> > >Not at all, there's only one version of LLVM IR, but it can appear in >binary bytecode or textual form (human-readable). They have a >one-to-one correlation. > >There is an assembler (llvm-as) and disassembler (llvm-dis) for >translating between the two formats. > > >Ah, great! That does mean that LLVM does what I was hoping for. Thanks for the info :o)