llvm.org GIT mirror llvm / c103adf
* Added a section describing the hidden gems in llvm/utils * Converted some tabs to spaces * Made lines fit within 80 columns git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7735 91177308-0d34-0410-b5e6-96231b3b80d8 Misha Brukman 16 years ago
1 changed file(s) with 82 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
77

Getting Started with the LLVM System
By:

88 href="mailto:gshi1@uiuc.edu">Guochun Shi,
99 Chris Lattner,
10 John Criswell, and
10 John Criswell,
11 Misha Brukman, and
1112 Vikram Adve
1213
1314
3738
  • The Location of LLVM Object Files
  • 3839
    3940
  • Program layout
  • 40
    41
  • CVS directories
  • 42
  • llvm/include
  • 43
  • llvm/lib
  • 44
  • llvm/test
  • 45
  • llvm/tools
  • 46 ol>
    41 <ol>
    42
  • CVS directories
  • 43
  • llvm/include
  • 44
  • llvm/lib
  • 45
  • llvm/test
  • 46
  • llvm/tools
  • 47
  • llvm/utils
  • 48
    4749
  • Compiling the LLVM C Front End
  • 4850
  • An Example Using the LLVM Tool Chain
  • 4951
  • Common Problems
  • 246248
    247249
  • cd where-you-want-llvm-to-live
  • 248250
  • gunzip --stdout llvm.tar.gz | tar -xvf -
  • 249
  • gunzip --stdout cfrontend.platform.tar.gz | tar -xvf -
  • 251
  • gunzip --stdout cfrontend.platform.tar.gz | tar
  • 252 -xvf -
    250253
  • cd llvm
  • 251254
    252255
    254257
    255258
  • With anonymous CVS access:
  • 256259
    257
  • Find the path to the CVS repository containing LLVM (we'll call this CVSROOTDIR).
  • 260
  • Find the path to the CVS repository containing LLVM (we'll
  • 261 call this CVSROOTDIR).
    258262
  • cd where-you-want-llvm-to-live
  • 259263
  • cvs -d CVSROOTDIR checkout llvm
  • 260264
  • cd llvm
  • 272276
    273277
  • --with-objroot=directory
  • 274278
    275 Specify where object files should be placed during the build.
    279 Specify where object files should be placed during the
    280 build.
    276281
    277282
  • --with-llvmgccdir=directory
  • 278283
    871876
    872877
    873878
    879
    880

    llvm/utils

    881
    882
    883 This directory contains utilities for working with LLVM sourcecode, and some
    884 of the utilities are actually required as part of the build process because
    885 they are code generators for parts of LLVM infrastructure.
    886
    887
    888 Burg
    Burg is an instruction selector
    889 generator -- it builds trees on which it then performs pattern-matching to
    890 select instructions according to the patterns the user has specified. Burg
    891 is currently used in the Sparc V9 backend.

    892
    893
    codegen-diff
    codegen-diff is a script
    894 that finds differences between code that LLC generates and code that LLI
    895 generates. This is a useful tool if you are debugging one of them,
    896 assuming that the other generates correct output. For the full user
    897 manual, run `perldoc codegen-diff'.

    898
    899
    cvsupdate
    cvsupdate is a script that will
    900 update your CVS tree, but produce a much cleaner and more organized output
    901 than simply running `cvs up -dP' will. For example, it will group
    902 together all the new and updated files and modified files in separate
    903 sections, so you can see at a glance what has changed. If you are at the
    904 top of your LLVM CVS tree, running utils/cvsupdate is the
    905 preferred way of updating the tree.

    906
    907
    emacs
    The emacs directory contains
    908 syntax-highlighting files which will work with Emacs and XEmacs editors,
    909 providing syntax highlighting support for LLVM assembly files and TableGen
    910 description files.

    911
    912
    getsrcs.sh
    The getsrcs.sh script finds
    913 and outputs all non-generated source files, which is useful if one wishes
    914 to do a lot of development across directories and does not want to
    915 individually find each file. One way to use it is to run, for example:
    916 xemacs `utils/getsources.sh` from the top of your LLVM source
    917 tree.

    918
    919
    makellvm
    The makellvm script compiles all
    920 files in the current directory and then compiles and links the tool that
    921 is the first argument. For example, assuming you are in the directory
    922 llvm/lib/Target/Sparc, if makellvm is in your path,
    923 simply running makellvm llc will make a build of the current
    924 directory, switch to directory llvm/tools/llc and build it,
    925 causing a re-linking of LLC.

    926
    927
    NightlyTest.pl and
    928 NightlyTestTemplate.html
    These files are used in a
    929 cron script to generate nightly status reports of the functionality of
    930 tools, and the results can be seen by following the appropriate link on
    931 the LLVM homepage.

    932
    933
    TableGen
    The TableGen directory contains
    934 the tool used to generate register descriptions, instruction set
    935 descriptins, and even assemblers from common TableGen description
    936 files.

    937
    938
    vim
    The vim directory contains
    939 syntax-highlighting files which will work with the VIM editor, providing
    940 syntax highlighting support for LLVM assembly files and TableGen
    941 description files.

    942
    943
    944
    874945
    875946

    Compiling the LLVM C Front End

    876947