From 61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 Mon Sep 17 00:00:00 2001
From: Chris Lattner
[UNION, ...eltty...]
- -The UNION record (code 17) adds a union type to -the type table. The eltty operand fields are zero or more type -indices representing the element types of the union. -
- -Unknown.
- -Aggregate Types are a subset of derived types that can contain multiple member types. Arrays, - structs, vectors and - unions are aggregate types.
+ structs, and vectors are + aggregate types. @@ -1714,9 +1711,7 @@ ClassificationsThe function type can be thought of as a function signature. It consists of a return type and a list of formal parameter types. The return type of a - function type is a scalar type, a void type, a struct type, or a union - type. If the return type is a struct type then all struct elements must be - of first class types, and the struct must have at least one element.
+ function type is a first class type or a void type.@@ -1837,53 +1832,6 @@ Classifications - - - -- -- @@ -2125,14 +2073,6 @@ Classifications the number and types of elements must match those specified by the type. -Overview:
-A union type describes an object with size and alignment suitable for - an object of any one of a given set of types (also known as an "untagged" - union). It is similar in concept and usage to a - struct, except that all members of the union - have an offset of zero. The elements of a union may be any type that has a - size. Unions must have at least one member - empty unions are not allowed. -
- -The size of the union as a whole will be the size of its largest member, - and the alignment requirements of the union as a whole will be the largest - alignment requirement of any member.
- -Union members are accessed using 'load and - 'store' by getting a pointer to a field with - the 'getelementptr' instruction. - Since all members are at offset zero, the getelementptr instruction does - not affect the address, only the type of the resulting pointer.
- -Syntax:
-- union { <type list> } -- -Examples:
--
- -- union { i32, i32*, float } -A union of three types: an i32, a pointer to - an i32, and a float. -- -- union { float, i32 (i32) * } -A union, where the first element is a float and the - second element is a pointer to a - function that takes an i32, returning - an i32. -
The first operand of an 'extractvalue' instruction is a value - of struct, union or + of struct or array type. The operands are constant indices to specify which value to extract in a similar manner as indices in a 'getelementptr' instruction.
@@ -4187,7 +4127,7 @@ InstructionThe first operand of an 'insertvalue' instruction is a value - of struct, union or + of struct or array type. The second operand is a first-class value to insert. The following operands are constant indices indicating the position at which to insert the value in a similar manner as indices in a @@ -4420,12 +4360,12 @@ Instruction indexes a value of the type pointed to (not necessarily the value directly pointed to, since the first index can be non-zero), etc. The first type indexed into must be a pointer value, subsequent types can be arrays, - vectors, structs and unions. Note that subsequent types being indexed into + vectors, and structs. Note that subsequent types being indexed into can never be pointers, since that would require loading the pointer before continuing calculation.
The type of each index argument depends on the type it is indexing into. - When indexing into a (optionally packed) structure or union, only i32 + When indexing into a (optionally packed) structure, only i32 integer constants are allowed. When indexing into an array, pointer or vector, integers of any width are allowed, and they are not required to be constant.
diff --git a/docs/ReleaseNotes.html b/docs/ReleaseNotes.html index ebf68f840f..3595735033 100644 --- a/docs/ReleaseNotes.html +++ b/docs/ReleaseNotes.html @@ -67,9 +67,8 @@ Almost dead code. include/llvm/Analysis/LiveValues.h => Dan lib/Transforms/IPO/MergeFunctions.cpp => consider for 2.8. llvm/Analysis/PointerTracking.h => Edwin wants this, consider for 2.8. - ABCD, GEPSplitterPass + GEPSplitterPass MSIL backend? - lib/Transforms/Utils/SSI.cpp -> ABCD depends on it. --> -- cgit v1.2.3