X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=docs%2FTableGenFundamentals.html;h=5be11624ced305d1c411fd5ad5cfe106a9b17f0d;hb=b2b31a6f93f5329c86e41c04ec8c33799d012f9e;hp=2e74352010f4198ed03f503a0c7f5521170c4c8b;hpb=938c8ab0a0f4a52d7d6ddc975abe9de08fee06d5;p=oota-llvm.git
diff --git a/docs/TableGenFundamentals.html b/docs/TableGenFundamentals.html
index 2e74352010f..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
@@ -395,28 +398,19 @@ supported include:
a dag value. The first element is required to be a record definition, the
remaining elements in the list may be arbitrary other values, including nested
`dag' values.
-(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.
-(parallel (a), (b))
- a list of dags specifying parallel operations which map to the same
- instruction.
!strconcat(a, b)
A string value that is the result of concatenating the 'a' and 'b'
strings.
-!cast(a)
+!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.
+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(!strconcat(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.
-!regmatch(a, b)
- An integer {0,1} indicating whether string 'b' matched regular expression
-'a.'
!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
@@ -429,6 +423,10 @@ class. This operation is analogous to $(foreach) in GNU make.
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
@@ -758,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.
+
+
+