Hi, I would like to use LLVM-GCC to compare its performance with other compilers. Something like testsuite "Computing very large Fibonacci numbers" at http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37. My environment: ----------------- Windows 2000 Cygwin $ uname -srom CYGWIN_NT-5.0 1.5.11(0.116/4/2) i686 Cygwin ----------------- What do I have to download from http://sourceforge.net/project/showfiles.php?group_id=119938&package_id=130753&release_id=270245: * executables(?) cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz ? * sources cfrontend-1.3.source.tar.gz ? 1. Question about executables. ------------------------------- After gunzip * cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz and * tar -xf cfrontend-1.3.i386-unknown-freebsd5.2.1.tar I see that cfrontend/x86/llvm-gcc/bin contains the following files: c++ cpp g++ gcc gccbug gcov i386-unknown-freebsd5.2.1-c++ i386-unknown-freebsd5.2.1-g++ i386-unknown-freebsd5.2.1-gcc i386-unknown-freebsd5.2.1-gcc-3.4-llvm Are they executables? Which of them should I use on Cygwin? 2. Question about sources. -------------------------- http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html#cygwin contains the following instruction: Configure and build the LLVM libraries and tools using: % cd llvm % ./configure [options...] % gmake tools-only 2.1. Which options should I use with ./configure [options...]? 2.2. Cygwin doesn't have gmake: $ which gmake gmake: Command not found. Could I use make? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn
Alex Vinokur wrote:> Hi, > > I would like to use LLVM-GCC to compare its performance with other compilers. > Something like testsuite "Computing very large Fibonacci numbers" at > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37. > > > My environment: > ----------------- > Windows 2000 > Cygwin > $ uname -srom > CYGWIN_NT-5.0 1.5.11(0.116/4/2) i686 Cygwin > ----------------- > > What do I have to download from > http://sourceforge.net/project/showfiles.php?group_id=119938&package_id=130753&release_id=270245: > * executables(?) cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz ? > * sources cfrontend-1.3.source.tar.gz ?You will need to download both the LLVM sources (llvm-1.3.tar.gz) and the LLVM-GCC sources (cfrontend-1.3.source.tar.gz). The LLVM sources always have to be built (we don't distribute binary verisons of these). You will have to build the LLVM GCC frontend on Cygwin since we don't have binaries for these (unless Cygwin supports FreeBSD emulation, the FreeBSD binaries won't work). I don't know if LLVM 1.3 will work on Cygwin. If not, you can get the latest llvm-gcc and llvm sources from our CVS repository; I know there is at least partial support for Cygwin in the latest sources. Please see http://llvm.cs.uiuc.edu/docs/GettingStarted.html#checkout for more information.> > 1. Question about executables. > ------------------------------- > After gunzip > * cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz > and > * tar -xf cfrontend-1.3.i386-unknown-freebsd5.2.1.tar > I see that cfrontend/x86/llvm-gcc/bin contains the following files: > > c++ > cpp > g++ > gcc > gccbug > gcov > i386-unknown-freebsd5.2.1-c++ > i386-unknown-freebsd5.2.1-g++ > i386-unknown-freebsd5.2.1-gcc > i386-unknown-freebsd5.2.1-gcc-3.4-llvm > > Are they executables? > > Which of them should I use on Cygwin?Well, you shouldn't use any of these, as the FreeBSD binaries probably won't work on Cygwin. But, once you build the llvm-gcc frontend, you'll get a very similar directory tree. To compile programs, you'll use the c++, g++, and gcc binaries listed above. I believe the programs with the "i386-unknown-freebsd..." prefix are just there in case you've got a cross compiling environment.> > > 2. Question about sources. > -------------------------- > http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html#cygwin contains the following instruction: > Configure and build the LLVM libraries and tools using: > % cd llvm > % ./configure [options...] > % gmake tools-only > > 2.1. Which options should I use with ./configure [options...]?The only option you will probably need is --with-llvmgccdir, which will tell the LLVM sources where the LLVM GCC files will eventually be located (they won't be there when you start, because you have to build LLVM before LLVM-GCC). The build process is a little inconvenient, but here's the gist of it: o) Build LLVM tools (i.e. configure llvm and do "make tools-only"). o) Build the LLVM GCC frontend. o) Go back into the LLVM sources, build the runtime libraries, and install them. o) Set the LLVM_LIB_SEARCH_PATH variable so that the LLVM tools can find the libraries. Please see our documentation (http://llvm.cs.uiuc.edu/docs/GettingStarted.html) and (http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html) for all the details. I highly recommend that you follow them as exactly as you can; missing one detail can mean the difference between a successful build and a very confusing build that doesn't work.> > 2.2. Cygwin doesn't have gmake: > $ which gmake > gmake: Command not found. > > Could I use make?On Cygwin, your make program is most likely GNU Make. Type: make --version ... and if you get something like this: GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. ... then your "make" program is actually "GNU Make" and will work just fine. If you run into any more trouble, please let us know. We'll do what we can to help. -- John T. -- ********************************************************************* * John T. Criswell Email: criswell at uiuc.edu * * Research Programmer * * University of Illinois at Urbana-Champaign * * * * "It's today!" said Piglet. "My favorite day," said Pooh. * *********************************************************************
On Oct 5, 2004, at 3:39 AM, Alex Vinokur wrote:> I would like to use LLVM-GCC to compare its performance with other > compilers. > Something like testsuite "Computing very large Fibonacci numbers" at > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37.For the performance comparisons that we run, see for example http://llvm.org/testresults/X86/ ; there we compare LLVM's performance to regular GCC on a daily, ongoing basis.> What do I have to download [...] ? > After gunzip > * cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz > [...] Which of them should I use on Cygwin?There is no binary executable C/C++ front-end distributed for Windows/Cygwin yet. You must build your own from sources; you can't use the FreeBSD-compiled C/C++ front end.> 2.1. Which options should I use with ./configure [options...]?For a first build of the LLVM tool chain on x86, you don't need to specify any options. You might want to specify --enable-spec2000 if you have the SPEC CPU2000 benchmark sources.> 2.2. Cygwin doesn't have gmake: > $ which gmake > gmake: Command not found. > Could I use make?Cygwin's make is GNU make; it should work. -Brian
On Tue, 5 Oct 2004, Alex Vinokur wrote:> I would like to use LLVM-GCC to compare its performance with other compilers. > Something like testsuite "Computing very large Fibonacci numbers" at > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37.Out of curiousity, I ran some quick tests on a AMD Athlon(TM) MP 2100+ box running Redhat linux 7.1. With the LLVM C backend and GCC 3.3 -O3, I got: $ time Output/bigfib.cbe th 50000 > /dev/null 0.800u 0.190s 0:00.99 100.0% 0+0k 0+0io 245pf+0w $ time Output/bigfib.cbe th 50000 > /dev/null 0.800u 0.190s 0:00.99 100.0% 0+0k 0+0io 245pf+0w $ time Output/bigfib.cbe th 50000 > /dev/null 0.770u 0.230s 0:00.99 101.0% 0+0k 0+0io 245pf+0w Native GCC 3.3 -O2: $ time Output/bigfib.native th 50000 > /dev/null 1.010u 0.170s 0:01.18 100.0% 0+0k 0+0io 234pf+0w $ time Output/bigfib.native th 50000 > /dev/null 1.030u 0.160s 0:01.17 101.7% 0+0k 0+0io 234pf+0w $ time Output/bigfib.native th 50000 > /dev/null 1.000u 0.170s 0:01.16 100.8% 0+0k 0+0io 234pf+0w Native GCC 3.3 -O3: $ time Output/bigfib.native th 50000 > /dev/null 0.940u 0.150s 0:01.08 100.9% 0+0k 0+0io 235pf+0w $ time Output/bigfib.native th 50000 > /dev/null 0.930u 0.150s 0:01.07 100.9% 0+0k 0+0io 235pf+0w $ time Output/bigfib.native th 50000 > /dev/null 0.890u 0.200s 0:01.08 100.9% 0+0k 0+0io 235pf+0w Note that this benchmark allocates a TON of memory, so it's not a wonderful benchmark of CPU bound tasks (also, the compiler in use will have less impact than for a CPU bound program). In any case, I've added this program to the LLVM testsuite as SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for it generated every night on multiple platforms. -Chris -- http://llvm.org/ http://nondot.org/sabre/
"Chris Lattner" <sabre at nondot.org> wrote in message news:Pine.LNX.4.44.0410051204480.5863-100000 at nondot.org...> On Tue, 5 Oct 2004, Alex Vinokur wrote: > > > I would like to use LLVM-GCC to compare its performance with other compilers. > > Something like testsuite "Computing very large Fibonacci numbers" at > > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37. > > Out of curiousity, I ran some quick tests on a AMD Athlon(TM) MP 2100+ box > running Redhat linux 7.1.[snip]> > Note that this benchmark allocates a TON of memory,The main purpose of the "Computing very large Fibonacci numbers" algorithm was to create fast _recursive_ algorithm. The algorithm generates very large Fibonacci numbers using the primary recursive formula: F(n) = F(n-1) + F(n-2) n > 1; F(1) = 1, F(0) = 0. Latest version of the algorithm is 2.7.9 and can be seen at http://groups.google.com/groups?selm=2paj5hFim4q1U1%40uni-berlin.de> so it's not a wonderful benchmark of CPU bound tasks (also, the compiler in use will > have less impact than for a CPU bound program). In any case, I've added > this program to the LLVM testsuite as > SingleSource/Benchmarks/Misc-C++/bigfib.cpp, so we should have numbers for > it generated every night on multiple platforms. >[snip] Newsgroup http://news.gmane.org/gmane.comp.lang.c%2B%2B.perfometer contains another testsuites. For instance: 1. Simple C++ Perfometer Methods of copying files http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/47. 2. C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer/ http://alexvn.freeservers.com/s1/perfometer.html Latest version is 2.8.0-1.18. Its description can be ssen at http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/39 List of all testsuites ---------------------- - access to an element - argument passing - argument passing (built-in types) - argument passing (containers-1) - argument passing (containers-2) - argument passing (containers-3) - calling functions : templated vs. non-templated - container performance (Stepanov & Stroustrup) - copying files : input to output - dynamic_cast vs. switch - endl vs. "\n", '\n' [! stdout/stderr > tmp] - exception handling vs. if-statement - find method vs. find algorithm - for-loop vs. for_each - for_each vs. transform - iterators - multiple inheritance vs. single inheritance - primitive operators - pthreads - reading contents from file into one string - recursion vs. iteration vs. accumulate - str-functions vs. mem-functions (C) - string initialization (C vs. STL) - string length (C vs. STL) - string processing (C vs. STL) - stub tested functions - tech report : D1 - overhead of class operations - tech report : D3 - the Stepanov abstraction penalty benchmark - tech report : D4 - comparing function objects to function pointers - tech report : D5 - measuring the cost of synchronized I/O - virtual vs. ordinary methods -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn
"John Criswell" <criswell at cs.uiuc.edu> wrote in message news:4162A940.8090307 at cs.uiuc.edu...> Alex Vinokur wrote: > > Hi, > > > > I would like to use LLVM-GCC to compare its performance with other compilers. > > Something like testsuite "Computing very large Fibonacci numbers" at > > http://article.gmane.org/gmane.comp.lang.c%2B%2B.perfometer/37. > > > > > > My environment: > > ----------------- > > Windows 2000 > > Cygwin > > $ uname -srom > > CYGWIN_NT-5.0 1.5.11(0.116/4/2) i686 Cygwin > > ----------------- > > > > What do I have to download from > > http://sourceforge.net/project/showfiles.php?group_id=119938&package_id=130753&release_id=270245: > > * executables(?) cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz ? > > * sources cfrontend-1.3.source.tar.gz ? > > You will need to download both the LLVM sources (llvm-1.3.tar.gz) and > the LLVM-GCC sources (cfrontend-1.3.source.tar.gz). > > The LLVM sources always have to be built (we don't distribute binary > verisons of these). You will have to build the LLVM GCC frontend on > Cygwin since we don't have binaries for these (unless Cygwin supports > FreeBSD emulation, the FreeBSD binaries won't work). > > I don't know if LLVM 1.3 will work on Cygwin. If not, you can get the > latest llvm-gcc and llvm sources from our CVS repository; I know there > is at least partial support for Cygwin in the latest sources. Please > see http://llvm.cs.uiuc.edu/docs/GettingStarted.html#checkout for more > information. > > > > > 1. Question about executables. > > ------------------------------- > > After gunzip > > * cfrontend-1.3.i386-unknown-freebsd5.2.1.tar.gz > > and > > * tar -xf cfrontend-1.3.i386-unknown-freebsd5.2.1.tar > > I see that cfrontend/x86/llvm-gcc/bin contains the following files: > > > > c++ > > cpp > > g++ > > gcc > > gccbug > > gcov > > i386-unknown-freebsd5.2.1-c++ > > i386-unknown-freebsd5.2.1-g++ > > i386-unknown-freebsd5.2.1-gcc > > i386-unknown-freebsd5.2.1-gcc-3.4-llvm > > > > Are they executables? > > > > Which of them should I use on Cygwin? > > Well, you shouldn't use any of these, as the FreeBSD binaries probably > won't work on Cygwin. > > But, once you build the llvm-gcc frontend, you'll get a very similar > directory tree. To compile programs, you'll use the c++, g++, and gcc > binaries listed above. I believe the programs with the > "i386-unknown-freebsd..." prefix are just there in case you've got a > cross compiling environment. > > > > > > > 2. Question about sources. > > -------------------------- > > http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html#cygwin contains the following instruction: > > Configure and build the LLVM libraries and tools using: > > % cd llvm > > % ./configure [options...] > > % gmake tools-only > > > > 2.1. Which options should I use with ./configure [options...]? > > The only option you will probably need is --with-llvmgccdir, which will > tell the LLVM sources where the LLVM GCC files will eventually be > located (they won't be there when you start, because you have to build > LLVM before LLVM-GCC). > > The build process is a little inconvenient, but here's the gist of it: > > o) Build LLVM tools (i.e. configure llvm and do "make tools-only"). > o) Build the LLVM GCC frontend. > o) Go back into the LLVM sources, build the runtime libraries, and > install them. > o) Set the LLVM_LIB_SEARCH_PATH variable so that the LLVM tools can find > the libraries. > > Please see our documentation > (http://llvm.cs.uiuc.edu/docs/GettingStarted.html) and > (http://llvm.cs.uiuc.edu/docs/CFEBuildInstrs.html) for all the details. > I highly recommend that you follow them as exactly as you can; missing > one detail can mean the difference between a successful build and a very > confusing build that doesn't work. > > > > > 2.2. Cygwin doesn't have gmake: > > $ which gmake > > gmake: Command not found. > > > > Could I use make? > > On Cygwin, your make program is most likely GNU Make. Type: > > make --version > > ... and if you get something like this: > > GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. > > ... then your "make" program is actually "GNU Make" and will work just fine. > > > If you run into any more trouble, please let us know. We'll do what we > can to help. > > -- John T. > > -- > ********************************************************************* > * John T. Criswell Email: criswell at uiuc.edu * > * Research Programmer * > * University of Illinois at Urbana-Champaign * > * * > * "It's today!" said Piglet. "My favorite day," said Pooh. * > *********************************************************************I would like to download LLVM 1.4 for Cygwin on Windows 2000. Here are a fragment from http://llvm.cs.uiuc.edu/releases/register.cgi a.. LLVM source code (3.5M) b.. LLVM Test Suite (8.0M) c.. GCC Front End Binaries for Linux/x86 (6.2M) d.. GCC Front End Binaries for Solaris/Sparc (6.6M) e.. GCC Front End Binaries for MacOS X/PowerPC (7.0M) f.. GCC Front End Source Code (30.0M) What do I have to dowonload for for Cygwin? -- Alex Vinokur email: alex DOT vinokur AT gmail DOT com http://mathforum.org/library/view/10978.html http://sourceforge.net/users/alexvn