X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FLangRef.html;h=03235ecaa40733b7a67825827695ed25d94594d7;hb=94082397d28b172830ba5f449b9dab301e47e5b7;hp=7b70c43831eb2d4d8e38ec42caf2b87f46f2e65f;hpb=8c6bb90b8ef7acad87d3fb7424dce02ee81fedd1;p=oota-llvm.git diff --git a/docs/LangRef.html b/docs/LangRef.html index 7b70c43831e..03235ecaa40 100644 --- a/docs/LangRef.html +++ b/docs/LangRef.html @@ -39,6 +39,7 @@
  • 'br' Instruction
  • 'switch' Instruction
  • 'invoke' Instruction +
  • 'unwind' Instruction
  • Binary Operations
      @@ -71,7 +72,8 @@
    1. 'phi' Instruction
    2. 'cast .. to' Instruction
    3. 'call' Instruction -
    4. 'va_arg' Instruction +
    5. 'vanext' Instruction +
    6. 'vaarg' Instruction
  • Intrinsic Functions @@ -99,8 +101,8 @@
    This document is a reference manual for the LLVM assembly language. LLVM is - an SSA based representation that provides type safety, low level operations, - flexibility, and the capability of representing 'all' high level languages + an SSA based representation that provides type safety, low-level operations, + flexibility, and the capability of representing 'all' high-level languages cleanly. It is the common code representation used throughout all phases of the LLVM compilation strategy.
    @@ -116,17 +118,17 @@ The LLVM code representation is designed to be used in three different forms: as -an in-memory compiler IR, as an on-disk bytecode representation, suitable for -fast loading by a dynamic compiler, and as a human readable assembly language -representation. This allows LLVM to provide a powerful intermediate +an in-memory compiler IR, as an on-disk bytecode representation (suitable for +fast loading by a Just-In-Time compiler), and as a human readable assembly +language representation. This allows LLVM to provide a powerful intermediate representation for efficient compiler transformations and analysis, while providing a natural means to debug and visualize the transformations. The three different forms of LLVM are all equivalent. This document describes the human readable representation and notation.

    -The LLVM representation aims to be a light weight and low level while being +The LLVM representation aims to be a light-weight and low-level while being expressive, typed, and extensible at the same time. It aims to be a "universal -IR" of sorts, by being at a low enough level that high level ideas may be +IR" of sorts, by being at a low enough level that high-level ideas may be cleanly mapped to it (similar to how microprocessors are "universal IR's", allowing many source languages to be mapped to them). By providing type information, LLVM can be used as the target of optimizations: for example, @@ -166,9 +168,17 @@ passes or input to the parser.

    LLVM uses three different forms of identifiers, for different purposes:

      -
    1. Numeric constants are represented as you would expect: 12, -3 123.421, etc. Floating point constants have an optional hexidecimal notation. -
    2. Named values are represented as a string of characters with a '%' prefix. For example, %foo, %DivisionByZero, %a.really.long.identifier. The actual regular expression used is '%[a-zA-Z$._][a-zA-Z$._0-9]*'. -
    3. Unnamed values are represented as an unsigned numeric value with a '%' prefix. For example, %12, %2, %44. +
    4. Numeric constants are represented as you would expect: 12, -3 123.421, etc. +Floating point constants have an optional hexidecimal notation. + +
    5. Named values are represented as a string of characters with a '%' prefix. +For example, %foo, %DivisionByZero, %a.really.long.identifier. The actual +regular expression used is '%[a-zA-Z$._][a-zA-Z$._0-9]*'. Identifiers +which require other characters in their names can be surrounded with quotes. In +this way, anything except a " character can be used in a name. + +
    6. Unnamed values are represented as an unsigned numeric value with a '%' +prefix. For example, %12, %2, %44.

    LLVM requires the values start with a '%' sign for two reasons: Compilers don't @@ -301,8 +311,11 @@ These different primitive types fall into a few useful classifications:

    first classbool, ubyte, sbyte, ushort, short,
    uint, int, ulong, long, float, double,
    pointer

    - - +The first class types are perhaps the most +important. Values of these types are the only ones which can be produced by +instructions, passed as arguments, or used as operands to instructions. This +means that all structures and arrays must be manipulated either by pointer or by +component.

    @@ -345,7 +358,7 @@ Here are some examples of multidimensional arrays:

    @@ -366,12 +379,12 @@ functions), for indirect function calls, and when defining a function.

    <returntype> (<parameter list>) -Where '<parameter list>' is a comma seperated list of type +Where '<parameter list>' is a comma-separated list of type specifiers. Optionally, the parameter list may include a type ..., -which indicates that the function takes a variable number of arguments. Note -that there currently is no way to define a function in LLVM that takes a -variable number of arguments, but it is possible to call a function that -is vararg.

    +which indicates that the function takes a variable number of arguments. +Variable argument functions can access their arguments with the variable argument handling intrinsic functions. +

    Examples:
       -Function Structure +Functions


    'unwind' Instruction