Hi, I just updated my LLVM sources from CVS/HEAD and rebuilt them. And I downloaded the GCC4 frontend from the 1.9 release. Now I cannot compile anything, since GCC frontend seems to produce BC files that cannot be read by llvm-dis, llc and other utils. llvm-dis shows a following message: Bytecode formats < 7 are not longer supported. Use llvm-upgrade. (Vers=6, Pos=9) But since the new llvm-dis cannot disassemble, I cannot use llvm-upgrade, since I need a way to produce an *.ll file. What's wrong? I thought that LLVM 1.9 GCC4 frontend produces BC files in a new format already? Or do I need to rebuild the front-end from the CVS? May be there are pre-built images available? -Roman __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
The format's changed since 1.9. You should download llvm-gcc4 source and compile it yourself. -bw On 12/19/06, Roman Levenstein <romixlev at yahoo.com> wrote:> Hi, > > I just updated my LLVM sources from CVS/HEAD and rebuilt them. And I > downloaded the GCC4 frontend from the 1.9 release. > > Now I cannot compile anything, since GCC frontend seems to produce BC > files that cannot be read by llvm-dis, llc and other utils. > > llvm-dis shows a following message: > Bytecode formats < 7 are not longer supported. Use llvm-upgrade. > (Vers=6, Pos=9) > > But since the new llvm-dis cannot disassemble, I cannot use > llvm-upgrade, since I need a way to produce an *.ll file. > > What's wrong? I thought that LLVM 1.9 GCC4 frontend produces BC files > in a new format already? Or do I need to rebuild the front-end from the > CVS? May be there are pre-built images available? > > -Roman > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Hi Roman, On Tue, 2006-12-19 at 17:32 -0800, Roman Levenstein wrote:> Hi, > > I just updated my LLVM sources from CVS/HEAD and rebuilt them. And I > downloaded the GCC4 frontend from the 1.9 release. > > Now I cannot compile anything, since GCC frontend seems to produce BC > files that cannot be read by llvm-dis, llc and other utils. > > llvm-dis shows a following message: > Bytecode formats < 7 are not longer supported. Use llvm-upgrade. > (Vers=6, Pos=9)That is correct. Bytecode format 6 corresponds to version 1.9. LLVM is currently using version 7 and the definition of version 7 is still in flux as the instruction set continues to change.> > 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> > 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.> Or do I need to rebuild the front-end from the > CVS?That's definitely the simplest thing to do.> 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.> > -RomanReid.> > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
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.bcOK. 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, Roman __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com