[LLVMdev] Problems with new bytecode format

Roman Levenstein romixlev at yahoo.com
Tue Dec 19 20:00:19 PST 2006

Hi Reid,

--- Reid Spencer <rspencer at reidspencer.com> wrote:
> On Tue, 2006-12-19 at 17:32 -0800, Roman Levenstein wrote:
> > But since the new llvm-dis cannot disassemble, I cannot use
> > llvm-upgrade, since I need a way to produce an *.ll file.
> If you can't do as Bill suggested (get the latest llvm-gcc and
> compile
> it), you can use this approach:
> Compile with the 1.9 version of llvm-gcc4. Use the -emit-llvm -S
> options. That will yield a 1.9 assembly (ll) file.
> Run llvm-upgrade from the CVS head on on the produced llvm assembly.
> That will produce another .ll file. Then that assembly file can be
> run through the latest llvm-as.
> Something like this:
> cfe1.9/bin/llvm-gcc -S -emit-llvm source.c -o - | \
>    HEAD/bin/llvm-upgrade | \
>    HEAD/bin/llvm-as -o source.bc

OK. I tried this approach and it works without any problems.

> > 
> > What's wrong? I thought that LLVM 1.9 GCC4 frontend produces BC
> files
> > in a new format already? 
> It is, but the format continues to change rapidly in preparation for
> release 2.0. Because of the rapid changes, we decided to break
> backwards compatibility except through LLVM Assembly files. This has
> drastically simplified our task and will get us to a 
> faster/smaller/smarter bytecode  format for 2.0 more easily.
> Sorry for any inconvenience this has caused, but it was necessary to
> make progress.

No problem. It was just not clear for me that the GCC4 frontend from
LLVM 1.9 release does not support the new bytecode format. 
> > Or do I need to rebuild the front-end from the
> > CVS?
> That's definitely the simplest thing to do.

OK. GCC4 build is in progress on my machine at the moment. I guess, it
will take a while ;)
> >  May be there are pre-built images available?
> No, there's not. We only distribute them in accordance with a
> release. The 2.0 release is not scheduled until the May time frame.

OK. It is not a big deal to rebuild it, even though I still think that
providing daily pre-build GCC front-ends for the current CVS HEAD
branch could be useful for nightly builds/tests and so on and could
save some time for LLVM developers/testers...

Thanks for clarifications,

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the llvm-dev mailing list