From a16c51cee9225a354c999dd1076d5dba2aa79807 Mon Sep 17 00:00:00 2001 From: rdivacky Date: Fri, 1 Jan 2010 10:31:22 +0000 Subject: Update LLVM to 92395. --- docs/CompilerDriver.html | 49 ++++++++++++++++++------------ docs/GettingStarted.html | 79 +++++++++++++++++++++++++++++++++--------------- docs/LangRef.html | 37 ++++++----------------- 3 files changed, 93 insertions(+), 72 deletions(-) (limited to 'docs') diff --git a/docs/CompilerDriver.html b/docs/CompilerDriver.html index 3af190d..b69b8c9 100644 --- a/docs/CompilerDriver.html +++ b/docs/CompilerDriver.html @@ -334,8 +334,8 @@ once). Incompatible with zero_or_ only for list options in conjunction with multi_val; for ordinary lists it is synonymous with required. Incompatible with required and zero_or_one. -
  • zero_or_one - the option can be specified zero or one times. Useful -only for list options in conjunction with multi_val. Incompatible with +
  • optional - the option can be specified zero or one times. Useful only +for list options in conjunction with multi_val. Incompatible with required and one_or_more.
  • hidden - the description of this option will not appear in the --help output (but will appear in the --help-hidden @@ -350,13 +350,14 @@ gcc's -Wa,.
  • multi_val n - this option takes n arguments (can be useful in some special cases). Usage example: (parameter_list_option "foo", (multi_val 3)); the command-line syntax is '-foo a b c'. Only list options can have -this attribute; you can, however, use the one_or_more, zero_or_one +this attribute; you can, however, use the one_or_more, optional and required properties.
  • init - this option has a default value, either a string (if it is a -parameter), or a boolean (if it is a switch; boolean constants are called -true and false). List options can't have this attribute. Usage -examples: (switch_option "foo", (init true)); (prefix_option "bar", -(init "baz")).
  • +parameter), or a boolean (if it is a switch; as in C++, boolean constants +are called true and false). List options can't have init +attribute. +Usage examples: (switch_option "foo", (init true)); (prefix_option +"bar", (init "baz")).
  • extern - this option is defined in some other plugin, see below.
  • @@ -604,10 +605,10 @@ def LanguageMap : LanguageMap< $ llvmc hello.cpp llvmc: Unknown suffix: cpp -

    The language map entries should be added only for tools that are -linked with the root node. Since tools are not allowed to have -multiple output languages, for nodes "inside" the graph the input and -output languages should match. This is enforced at compile-time.

    +

    The language map entries are needed only for the tools that are linked from the +root node. Since a tool can't have multiple output languages, for inner nodes of +the graph the input and output languages should match. This is enforced at +compile-time.

    Option preprocessor

    @@ -619,22 +620,30 @@ the driver with both of these options enabled.

    occasions. Example (adapted from the built-in Base plugin):

     def Preprocess : OptionPreprocessor<
    -(case (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
    -           [(unset_option ["O0", "O1", "O2"]),
    -            (warning "Multiple -O options specified, defaulted to -O3.")],
    +(case (not (any_switch_on ["O0", "O1", "O2", "O3"])),
    +           (set_option "O2"),
    +      (and (switch_on "O3"), (any_switch_on ["O0", "O1", "O2"])),
    +           (unset_option ["O0", "O1", "O2"]),
           (and (switch_on "O2"), (any_switch_on ["O0", "O1"])),
                (unset_option ["O0", "O1"]),
           (and (switch_on "O1"), (switch_on "O0")),
                (unset_option "O0"))
     >;
     
    -

    Here, OptionPreprocessor is used to unset all spurious optimization options -(so that they are not forwarded to the compiler).

    +

    Here, OptionPreprocessor is used to unset all spurious -O options so +that they are not forwarded to the compiler. If no optimization options are +specified, -O2 is enabled.

    OptionPreprocessor is basically a single big case expression, which is evaluated only once right after the plugin is loaded. The only allowed actions -in OptionPreprocessor are error, warning and a special action -unset_option, which, as the name suggests, unsets a given option. For -convenience, unset_option also works on lists.

    +in OptionPreprocessor are error, warning, and two special actions: +unset_option and set_option. As their names suggest, they can be used to +set or unset a given option. To set an option with set_option, use the +two-argument form: (set_option "parameter", VALUE). Here, VALUE can be +either a string, a string list, or a boolean constant.

    +

    For convenience, set_option and unset_option also work on lists. That +is, instead of [(unset_option "A"), (unset_option "B")] you can use +(unset_option ["A", "B"]). Obviously, (set_option ["A", "B"]) is valid +only if both A and B are switches.

    More advanced topics

    @@ -739,7 +748,7 @@ the Base plugin behav Mikhail Glushenkov
    LLVM Compiler Infrastructure
    -Last modified: $Date: 2009-12-07 19:26:24 +0100 (Mon, 07 Dec 2009) $ +Last modified: $Date: 2009-12-23 13:49:51 +0100 (Wed, 23 Dec 2009) $
    diff --git a/docs/GettingStarted.html b/docs/GettingStarted.html index 4b2b56f..5f17b5b 100644 --- a/docs/GettingStarted.html +++ b/docs/GettingStarted.html @@ -114,13 +114,15 @@ and performance.
  • Read the documentation.
  • Read the documentation.
  • Remember that you were warned twice about reading the documentation.
  • -
  • Install the llvm-gcc-4.2 front end if you intend to compile C or C++: +
  • Install the llvm-gcc-4.2 front end if you intend to compile C or C++ + (see Install the GCC Front End for details):
    1. cd where-you-want-the-C-front-end-to-live
    2. -
    3. gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf - -
    4. -
    5. Note: If the binary extension is ".bz" use bunzip2 instead of gunzip.
    6. -
    7. Add llvm-gcc's "bin" directory to your PATH variable.
    8. +
    9. gunzip --stdout llvm-gcc-4.2-version-platform.tar.gz | tar -xvf -
    10. +
    11. install-binutils-binary-from-MinGW (Windows only)
    12. +
    13. Note: If the binary extension is ".bz" use bunzip2 instead of gunzip.
    14. +
    15. Note: On Windows, use 7-Zip or a similar archiving tool.
    16. +
    17. Add llvm-gcc's "bin" directory to your PATH environment variable.
  • Get the LLVM Source Code @@ -774,13 +776,14 @@ instructions to successfully get and build the LLVM GCC front-end.

    -

    Before configuring and compiling the LLVM suite, you can optionally extract the -LLVM GCC front end from the binary distribution. It is used for running the -llvm-test testsuite and for compiling C/C++ programs. Note that you can optionally -build llvm-gcc yourself after building the +

    Before configuring and compiling the LLVM suite (or if you want to use just the LLVM +GCC front end) you can optionally extract the front end from the binary distribution. +It is used for running the llvm-test testsuite and for compiling C/C++ programs. Note that +you can optionally build llvm-gcc yourself after building the main LLVM repository.

    -

    To install the GCC front end, do the following:

    +

    To install the GCC front end, do the following (on Windows, use an archival tool +like 7-zip that understands gzipped tars):

    1. cd where-you-want-the-front-end-to-live
    2. @@ -788,22 +791,51 @@ main LLVM repository.

      -
    -

    Once the binary is uncompressed, you should add a symlink for llvm-gcc and -llvm-g++ to some directory in your path. When you configure LLVM, it will -automatically detect llvm-gcc's presence (if it is in your path) enabling its -use in llvm-test. Note that you can always build or install llvm-gcc at any -pointer after building the main LLVM repository: just reconfigure llvm and +

    Once the binary is uncompressed, if you're using a *nix-based system, add a symlink for +llvm-gcc and llvm-g++ to some directory in your path. If you're using a +Windows-based system, add the bin subdirectory of your front end installation directory +to your PATH environment variable. For example, if you uncompressed the binary to +c:\llvm-gcc, add c:\llvm-gcc\bin to your PATH.

    + +

    If you now want to build LLVM from source, when you configure LLVM, it will +automatically detect llvm-gcc's presence (if it is in your path) enabling its +use in llvm-test. Note that you can always build or install llvm-gcc at any +point after building the main LLVM repository: just reconfigure llvm and llvm-test will pick it up.

    -

    The binary versions of the GCC front end may not suit all of your needs. For -example, the binary distribution may include an old version of a system header -file, not "fix" a header file that needs to be fixed for GCC, or it may be -linked with libraries not available on your system.

    +

    As a convenience for Windows users, the front end binaries for MinGW/x86 include +versions of the required w32api and mingw-runtime binaries. The last remaining step for +Windows users is to simply uncompress the binary binutils package from +MinGW into your front end installation directory. While the +front end installation steps are not quite the same as a typical manual MinGW installation, +they should be similar enough to those who have previously installed MinGW on Windows systems.

    + +

    To install binutils on Windows:

    + +
      +
    1. download GNU Binutils from MinGW Downloads
    2. +
    3. cd where-you-uncompressed-the-front-end
    4. +
    5. uncompress archived binutils directories (not the tar file) into the current directory
    6. +
    -

    In cases like these, you may want to try building the GCC front end from source. This is -much easier now than it was in the past.

    +

    The binary versions of the LLVM GCC front end may not suit all of your needs. For +example, the binary distribution may include an old version of a system header +file, not "fix" a header file that needs to be fixed for GCC, or it may be linked with +libraries not available on your system. In cases like these, you may want to try +building the GCC front end from source. Thankfully, +this is much easier now than it was in the past.

    + +

    We also do not currently support updating of the GCC front end by manually overlaying +newer versions of the w32api and mingw-runtime binary packages that may become available +from MinGW. At this time, it's best to think of the MinGW LLVM GCC front end binary as +a self-contained convenience package that requires Windows users to simply download and +uncompress the GNU Binutils binary package from the MinGW project.

    + +

    Regardless of your platform, if you discover that installing the LLVM GCC front end +binaries is not as easy as previously described, or you would like to suggest improvements, +please let us know how you would like to see things improved by dropping us a note on our +mailing list.

    @@ -1171,7 +1203,6 @@ Cummings for pointing this out! -
    Program Layout @@ -1640,7 +1671,7 @@ out:

    Chris Lattner
    Reid Spencer
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-12-09 18:26:02 +0100 (Wed, 09 Dec 2009) $ + Last modified: $Date: 2009-12-17 18:18:11 +0100 (Thu, 17 Dec 2009) $ diff --git a/docs/LangRef.html b/docs/LangRef.html index 8b17e0e..ba09f4c 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -7257,8 +7257,8 @@ LLVM.

    Syntax:
    -  declare i32 @llvm.objectsize.i32( i8* <ptr>, i32 <type> )
    -  declare i64 @llvm.objectsize.i64( i8* <ptr>, i32 <type> )
    +  declare i32 @llvm.objectsize.i32( i8* <object>, i1 <type> )
    +  declare i64 @llvm.objectsize.i64( i8* <object>, i1 <type> )
     
    Overview:
    @@ -7267,34 +7267,15 @@ LLVM.

    operation like memcpy will either overflow a buffer that corresponds to an object, or b) to determine that a runtime check for overflow isn't necessary. An object in this context means an allocation of a - specific type.

    + specific class, structure, array, or other object.

    Arguments:

    The llvm.objectsize intrinsic takes two arguments. The first - argument is a pointer to the object ptr. The second argument - is an integer type which ranges from 0 to 3. The first bit in - the type corresponds to a return value based on whole objects, - and the second bit whether or not we return the maximum or minimum - remaining bytes computed.

    - - - - - - - - - - - - - - - - - -
    00whole object, maximum number of bytes
    01partial object, maximum number of bytes
    10whole object, minimum number of bytes
    11partial object, minimum number of bytes
    - + argument is a pointer to or into the object. The second argument + is a boolean 0 or 1. This argument determines whether you want the + maximum (0) or minimum (1) bytes remaining. This needs to be a literal 0 or + 1, variables are not allowed.

    +
    Semantics:

    The llvm.objectsize intrinsic is lowered to either a constant representing the size of the object concerned or i32/i64 -1 or 0 @@ -7313,7 +7294,7 @@ LLVM.

    Chris Lattner
    The LLVM Compiler Infrastructure
    - Last modified: $Date: 2009-12-05 03:46:03 +0100 (Sat, 05 Dec 2009) $ + Last modified: $Date: 2009-12-23 01:29:49 +0100 (Wed, 23 Dec 2009) $ -- cgit v1.1