X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FTableGenFundamentals.html;h=5be11624ced305d1c411fd5ad5cfe106a9b17f0d;hb=b2b31a6f93f5329c86e41c04ec8c33799d012f9e;hp=a698041512a97217141472932a9de5e2ccf2bf6b;hpb=e8cf21e8e3db64dd49777d6bf6c867d47e9f5407;p=oota-llvm.git
diff --git a/docs/TableGenFundamentals.html b/docs/TableGenFundamentals.html
index a698041512a..5be11624ced 100644
--- a/docs/TableGenFundamentals.html
+++ b/docs/TableGenFundamentals.html
@@ -151,11 +151,10 @@ file prints this (at the time of this writing):
bit isReMaterializable = 0;
bit isPredicable = 0;
bit hasDelaySlot = 0;
- bit usesCustomDAGSchedInserter = 0;
+ bit usesCustomInserter = 0;
bit hasCtrlDep = 0;
bit isNotDuplicable = 0;
bit hasSideEffects = 0;
- bit mayHaveSideEffects = 0;
bit neverHasSideEffects = 0;
InstrItinClass Itinerary = NoItinerary;
string Constraints = "";
@@ -189,7 +188,7 @@ backend, and is only shown as an example.
As you can see, a lot of information is needed for every instruction
supported by the code generator, and specifying it all manually would be
-unmaintainble, prone to bugs, and tiring to do in the first place. Because we
+unmaintainable, prone to bugs, and tiring to do in the first place. Because we
are using TableGen, all of the information was derived from the following
definition:
@@ -334,8 +333,9 @@ The TableGen types are:
This type represents a nestable directed graph of elements.
code
- This represents a big hunk of text. NOTE: I don't remember why this is
- distinct from string!
+ This represents a big hunk of text. This is lexically distinct from
+ string values because it doesn't require escapeing double quotes and other
+ common characters that occur in code.
To date, these types have been sufficient for describing things that
@@ -371,8 +371,11 @@ supported include:
string value
[{ ... }]
code fragment
-[ X, Y, Z ]
- list value.
+[ X, Y, Z ]<type>
+ list value. <type> is the type of the list
+element and is usually optional. In rare cases,
+TableGen is unable to deduce the element type in
+which case the user must specify it explicitly.
{ a, b, c }
initializer for a "bits<3>" value
value
@@ -398,11 +401,32 @@ supported include:
!strconcat(a, b)
A string value that is the result of concatenating the 'a' and 'b'
strings.
-!nameconcat(a, b)
- A value that is the result of concatenating the 'a' and 'b'
- strings and looking up the resulting name in the symbol table. The symbol type
- determines the type of the resulting value. If the symbol is not found
- or the symbol type does not match 'type,' TableGen emits an error and aborts.
+!cast<type>(a)
+ A symbol of type type obtained by looking up the string 'a' in
+the symbol table. If the type of 'a' does not match type, TableGen
+aborts with an error. !cast<string> is a special case in that the argument must
+be an object defined by a 'def' construct.
+!nameconcat<type>(a, b)
+ Shorthand for !cast<type>(!strconcat(a, b))
+!subst(a, b, c)
+ If 'a' and 'b' are of string type or are symbol references, substitute
+'b' for 'a' in 'c.' This operation is analogous to $(subst) in GNU make.
+!foreach(a, b, c)
+ For each member 'b' of dag or list 'a' apply operator 'c.' 'b' is a
+dummy variable that should be declared as a member variable of an instantiated
+class. This operation is analogous to $(foreach) in GNU make.
+!car(a)
+ The first element of list 'a.'
+!cdr(a)
+ The 2nd-N elements of list 'a.'
+!null(a)
+ An integer {0,1} indicating whether list 'a' is empty.
+!if(a,b,c)
+ 'b' if the result of integer operator 'a' is nonzero, 'c' otherwise.
+!eq(a,b)
+ Integer one if string a is equal to string b, zero otherwise. This
+ only operates on string objects. Use !cast to compare other
+ types of objects.
Note that all of the values have rules specifying how they convert to values
@@ -732,6 +756,22 @@ opened, as in the case with the CALL* instructions above.
+
+
+
+
+Expressions used by code generator to describe instructions and isel
+patterns:
+
+
+
+
(implicit a)
+ an implicitly defined physical register. This tells the dag instruction
+ selection emitter the input pattern's extra definitions matches implicit
+ physical register definitions.
+
+
+