diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html index d98573e253a..9a09c9bb484 100644 --- a/docs/ProgrammersManual.html +++ b/docs/ProgrammersManual.html @@ -521,7 +521,7 @@ STATISTIC(NumXForms, "The # of times I did stuff");
The STATISTIC macro defines a static variable, whose name is specified by the first argument. The pass name is taken from the DEBUG_TYPE macro, and the description is taken from the second argument. The variable - defined ("NumXForms" in this case) acts like an unsigned int.
+ defined ("NumXForms" in this case) acts like an unsigned integer.Whenever you make a transformation, bump the counter:
@@ -1278,8 +1278,8 @@ system. For our purposes below, we need three concepts. First, an "Opaque Type" is exactly as defined in the language reference. Second an "Abstract Type" is any type which includes an -opaque type as part of its type graph (for example "{ opaque, int }"). -Third, a concrete type is a type that is not an abstract type (e.g. "{ int, +opaque type as part of its type graph (for example "{ opaque, i32 }"). +Third, a concrete type is a type that is not an abstract type (e.g. "{ i32, float }"). @@ -1300,7 +1300,7 @@ to be emitted to an output .ll file:-%mylist = type { %mylist*, int } +%mylist = type { %mylist*, i32 }
In the example above, the OpaqueType object is definitely deleted. -Additionally, if there is an "{ \2*, int}" type already created in the system, +Additionally, if there is an "{ \2*, i32}" type already created in the system, the pointer and struct type created are also deleted. Obviously whenever a type is deleted, any "Type*" pointers in the program are invalidated. As such, it is safest to avoid having any "Type*" pointers to abstract types @@ -1411,8 +1411,8 @@ To support this, a class can derive from the AbstractTypeUser class. This class allows it to get callbacks when certain types are resolved. To register to get callbacks for a particular type, the DerivedType::{add/remove}AbstractTypeUser methods can be called on a type. Note that these methods only work for -abstract types. Concrete types (those that do not include an opaque objects -somewhere) can never be refined. + abstract types. Concrete types (those that do not include any opaque +objects) can never be refined.
@@ -1647,7 +1647,7 @@ method. In addition, all LLVM values can be named. The "name" of the-%foo = add int 1, 2 +%foo = add i32 1, 2
Type as noted earlier is also a subclass of a Value class. Any primitive -type (like int, short etc) in LLVM is an instance of Type Class. All other -types are instances of subclasses of type like FunctionType, ArrayType -etc. DerivedType is the interface for all such dervied types including -FunctionType, ArrayType, PointerType, StructType. Types can have names. They can -be recursive (StructType). There exists exactly one instance of any type -structure at a time. This allows using pointer equality of Type *s for comparing -types.
- +Type is a superclass of all type classes. Every Value has + a Type. Type cannot be instantiated directly but only + through its subclasses. Certain primitive types (VoidType, + LabelType, FloatType and DoubleType) have hidden + subclasses. They are hidden because they offer no useful functionality beyond + what the Type class offers except to distinguish themselves from + other subclasses of Type.
+All other types are subclasses of DerivedType. Types can be + named, but this is not a requirement. There exists exactly + one instance of a given shape at any one time. This allows type equality to + be performed with address equality of the Type Instance. That is, given two + Type* values, the types are identical if the pointers are identical. +