Partial support for integer divisions in access vectors
[suif.git] / html / suif1_11.html
blobb016ee133874c3191539ea95eb4329b6a2fb3da8
1 <HTML>
2 <HEAD>
3 <!-- This HTML file has been created by texi2html 1.54
4 from suif1.texi on 28 April 1999 -->
6 <TITLE>The SUIF Version 1 Library - Tree Nodes</TITLE>
7 <link href="suif1_12.html" rel=Next>
8 <link href="suif1_10.html" rel=Previous>
9 <link href="suif1_toc.html" rel=ToC>
11 </HEAD>
12 <BODY>
13 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_10.html">previous</A>, <A HREF="suif1_12.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
14 <P><HR><P>
17 <H2><A NAME="SEC11" HREF="suif1_toc.html#TOC11">Tree Nodes</A></H2>
18 <P>
19 <A NAME="IDX24"></A>
20 <A NAME="IDX25"></A>
22 </P>
23 <P>
24 <A NAME="IDX26"></A>
25 The different kinds of AST nodes are represented by objects derived from
26 the <CODE>tree_node</CODE> class. This base class includes features, such as
27 ID numbers, that are shared by all kinds of tree nodes.
29 </P>
30 <P>
31 The simplest kind of tree node is a <CODE>tree_instr</CODE>. Each of these is
32 a leaf node that contains a single instruction or expression.
34 </P>
35 <P>
36 Conditional structures may be represented by <CODE>tree_if</CODE> nodes.
38 </P>
39 <P>
40 The ASTs include two different kinds of loop nodes. The
41 <CODE>tree_loop</CODE> nodes just record the control-flow structure of the
42 loops and are used to represent generic "do-while" loops. Many
43 optimizations, however, only apply to certain well-behaved types of
44 loops. Thus, the trees may also contain <CODE>tree_for</CODE> nodes to
45 represent loops with scalar indices that vary from their initial to
46 final values, being incremented or decremented on every iteration, and
47 that meet various other requirements. Most Fortran <CODE>DO</CODE> loops
48 qualify as <CODE>tree_for</CODE> nodes. Those loops which do not meet the
49 requirements for <CODE>tree_for</CODE> nodes are represented by
50 <CODE>tree_loop</CODE> nodes instead.
52 </P>
53 <P>
54 Nested scopes are represented by <CODE>tree_block</CODE> nodes. A
55 <CODE>tree_block</CODE> contains a list of tree nodes and a symbol table. The
56 symbols and types in the table may only be referenced from within the
57 block. The node at the root of an AST is a special kind of
58 <CODE>tree_block</CODE> called a <CODE>tree_proc</CODE>. The <CODE>tree_proc</CODE>
59 objects use a slightly different kind of symbol table and include some
60 extra methods but are otherwise the same as the <CODE>tree_block</CODE>
61 objects.
63 </P>
65 <UL>
66 <LI><A HREF="suif1_12.html#SEC12">ID Numbers</A>: ID numbers for tree nodes and instructions.
67 <LI><A HREF="suif1_13.html#SEC13">Other Node Features</A>: Other features shared by all tree nodes.
68 <LI><A HREF="suif1_14.html#SEC14">Instruction Nodes</A>: Leaf nodes: instructions and expressions.
69 <LI><A HREF="suif1_15.html#SEC15">If Nodes</A>: Conditionals.
70 <LI><A HREF="suif1_16.html#SEC16">Loop Nodes</A>: General do-while loops.
71 <LI><A HREF="suif1_17.html#SEC17">For Nodes</A>: Nicely-structured FOR loops.
72 <LI><A HREF="suif1_18.html#SEC18">Block Nodes</A>: Nested scopes.
73 <LI><A HREF="suif1_19.html#SEC19">Procedure Nodes</A>: Root nodes for procedure bodies.
74 </UL>
76 <P><HR><P>
77 <p>Go to the <A HREF="suif1_1.html">first</A>, <A HREF="suif1_10.html">previous</A>, <A HREF="suif1_12.html">next</A>, <A HREF="suif1_113.html">last</A> section, <A HREF="suif1_toc.html">table of contents</A>.
78 </BODY>
79 </HTML>