added constructors for Carry and Borrow nodes, use macros to shorten the implementation
[libfirm] / ir / ir / ircons.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/ircons.h
4  * Purpose:     Various irnode constructors.  Automatic construction
5  *              of SSA representation.
6  * Author:      Martin Trapp, Christian Schaefer
7  * Modified by: Goetz Lindenmaier, Boris Boesler
8  * Created:
9  * CVS-ID:      $Id$
10  * Copyright:   (c) 1998-2003 Universität Karlsruhe
11  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
12  */
13
14 /**
15  @todo
16  Ideas for imrovement:
17  -# Handle construction of exceptions more comfortable:
18     Add new constructors that pass the exception region (or better the
19     Phi for the memories, the ex. region can be found from there) as parameter,
20     constructor then adds all Proj nodes and returns the pointer
21     to the Proj node that selects the result of the arithmetic operation.
22  -# Maybe hide the exception region in a global variable, especially if
23     it is always unambiguous.
24 */
25
26 /**
27  *  @file ircons.h
28  *
29  *  documentation no more supported since 2001
30  *
31  *  ir node construction.
32  *
33  *  @author Martin Trapp, Christian Schaefer, Goetz Lindenmaier
34  *
35  *    This file documents all datatypes and constructors needed to
36  *    build a FIRM representation of a procedure.  The constructors are
37  *    also implemented in this file.
38  *
39  *    The documentation also gives a short manual how to use the library.
40  *
41  *    For extensive documentation of FIRM see UKA Techreport 1999-14.
42  *
43  *
44  *    Three kinds of nodes
45  *    --------------------
46  *
47  *      There are three kinds of nodes known to the ir:  entities,
48  *      types, and ir_nodes
49  *
50  *      + ir_nodes are the actual nodes of the FIRM intermediate representation.
51  *        They represent operations on the data of the program and control flow
52  *        operations.
53  *
54  *      + entity ==> implemented in entity.h
55  *        Refers to a single entity of the compiled program, e.g. a field of a
56  *        class or a method.  If a method or variable can not be assigned to
57  *        a method or class or the like, it is a global object.
58  *
59  *      + types ==> implemented in type.h
60  *        With types type information is represented.  There are several type
61  *       nodes.
62  *
63  *    Implementation of the FIRM operations: ir_node
64  *    ----------------------------------------------
65  *
66  *      Ir_nodes represent operations on the data of the program and control flow
67  *      operations.  Examples of ir_nodes:  Add, Jmp, Cmp
68  *
69  *      FIRM is a dataflow graph.  A dataflow graph is a directed graph,
70  *      so that every node has incoming and outgoing edges.  A node is
71  *      executable if every input at it's incoming edges is available.
72  *      Execution of the dataflow graph is started at the Start node which
73  *      has no incoming edges and ends when the End node executes, even if
74  *      there are still executable or not executed nodes.  (Is this true,
75  *      or must all executable nodes be executed?)  (There are exceptions
76  *      to the dataflow paradigma that all inputs have to be available
77  *      before a node can execute: Phi, Block.  See UKA Techreport
78  *      1999-14.)
79  *
80  *      The implementation of FIRM differs from the view as a dataflow
81  *      graph.  To allow fast traversion of the graph edges are
82  *      implemented as C-pointers.  Inputs to nodes are not ambiguous, the
83  *      results can be used by several other nodes.  Each input can be
84  *      implemented as a single pointer to a predecessor node, outputs
85  *      need to be lists of pointers to successors.  Therefore a node
86  *      contains pointers to it's predecessor so that the implementation is a
87  *      dataflow graph with reversed edges.  It has to be traversed bottom
88  *      up.
89  *
90  *      All nodes of the ir have the same basic structure.  They are
91  *      distinguished by a field containing the opcode.
92  *
93  *      The fields of an ir_node:
94  *
95  *      kind             A firm_kind tag containing k_ir_node.  This is useful for
96  *                       dynamically checking the type of a node.
97  *
98  *      *op              This ir_op gives the opcode as a tag and a string
99  *                       and the number of attributes of an ir_node.  There is
100  *                       one statically allocated struct ir_op for each opcode.
101  *
102  *      *mode            The ir_mode of the operation represented by this firm
103  *                      node.  The mode of the operation is the mode of it's
104  *                       result.  A Firm mode is a datatype as known to the target,
105  *               not a type of the source language.
106  *
107  *      visit            A flag for traversing the ir.
108  *
109  *      **in             An array with pointers to the node's predecessors.
110  *
111  *      *link            A pointer to an ir_node.  With this pointer all Phi nodes
112  *                       are attached to a Block, i.e., a Block points to it's
113  *                       first Phi node, this node points to the second Phi node
114  *                       in the Block and so fourth.  Used in mature_immBlock
115  *                       to find all Phi nodes to be matured.  It's also used to
116  *               annotate a node with a better, optimized version of it.
117  *
118  *      attr             An attr struct containing the attributes of the nodes. The
119  *                       attributes depend on the opcode of the node.  The number
120  *               of these attributes is given in op.
121  *
122  *    The struct ir_op
123  *    ----------------
124  *                       Not yet documented. See irop.h.
125  *
126  *    The struct ir_mode
127  *    ------------------
128  *                       Not yet documented. See irmode.h.
129  *
130  *    GLOBAL VARIABLES -- now also fields of ir_graph.
131  *    ================
132  *
133  *    current_ir_graph   Points to the current ir_graph.  All constructors for
134  *                      nodes add nodes to this graph.
135  *
136  *    ir_visited         An int used as flag to traverse the ir_graph.
137  *
138  *    block_visited      An int used as a flag to traverse block nodes in the
139  *                       graph.
140  *
141  *                       Others not yet documented.
142  *
143  *
144  *
145  *    CONSTRUCTOR FOR IR_GRAPH --> see irgraph.h
146  *    ========================
147  *
148  *
149  *    PROCEDURE TO CONSTRUCT AN IR GRAPH --> see also Firm tutorial
150  *    ==================================
151  *
152  *    This library supplies several interfaces to construct a FIRM graph for
153  *    a program:
154  *    - A "comfortable" interface generating SSA automatically.  Automatically
155  *      computed predecessors of nodes need not be specified in the constructors.
156  *      (new_<Node> constructurs and a set of additional routines.)
157  *    - A less comfortable interface where all predecessors except the block
158  *      an operation belongs to need to be specified.  SSA must be constructed
159  *      by hand.  (new_<Node> constructors and set_cur_block()).  This interface
160  *      is called "block oriented".  It automatically calles the local optimizations
161  *      for each new node.
162  *    - An even less comfortable interface where the block needs to be specified
163  *      explicitly.  This is called the "raw" interface. (new_r_<Node>
164  *      constructors).  These nodes are not optimized.
165  *
166  *    To use the functionality of the comfortable interface correctly the Front
167  *    End needs to follow certain protocols.  This is explained in the following.
168  *    To build a correct IR with the other interfaces study the semantics of
169  *    the firm node (See tech-reprot UKA 1999-14).  For the construction of
170  *    types and entities see the documentation in those modules.
171  *
172  *    First the Frontend needs to decide which variables and values used in
173  *    a procedure can be represented by dataflow edges.  These are variables
174  *    that need not be saved to memory as they cause no side effects visible
175  *    out of the procedure.  Often these are all compiler generated
176  *    variables and simple local variables of the procedure as integers,
177  *    reals and pointers.  The frontend has to count and number these variables.
178  *
179  *    First an ir_graph needs to be constructed with new_ir_graph.  The
180  *    constructor gets the number of local variables.  The graph is hold in the
181  *    global variable irg.
182  *
183  *    Now the construction of the procedure can start.  Several basic blocks can
184  *    be constructed in parallel, but the code within each block needs to
185  *    be constructed (almost) in program order.
186  *
187  *    A global variable holds the current basic block.  All (non block) nodes
188  *    generated are added to this block.  The current block can be set with
189  *    set_cur_block(block).  If several blocks are constructed in parallel block
190  *    switches need to be performed constantly.
191  *
192  *    To generate a Block node (with the comfortable interface) it's predecessor
193  *    control flow nodes need not be known.  In case of cyclic control flow these
194  *    can not be known when the block is constructed.  With add_immBlock_pred(block,
195  *    cfnode) predecessors can be added to the block.  If all predecessors are
196  *    added to the block mature_immBlock(b) needs to be called.  Calling mature_immBlock
197  *    early improves the efficiency of the Phi node construction algorithm.
198  *    But if several  blocks are constructed at once, mature_immBlock must only
199  *    be called after performing all set_values and set_stores in the block!
200  *    (See documentation of new_immBlock constructor.)
201  *
202  *    The constructors of arithmetic nodes require that their predecessors
203  *    are mentioned.  Sometimes these are available in the Frontend as the
204  *    predecessors have just been generated by the frontend.  If they are local
205  *    values the predecessors can be obtained from the library with a call to
206  *    get_value(local_val_nr).  (local_val_nr needs to be administered by
207  *    the Frontend.)  A call to get_value triggers the generation of Phi nodes.
208  *    If an arithmetic operation produces a local value this value needs to be
209  *    passed to the library by set_value(node, local_val_nr).
210  *    In straight line code these two operations just remember and return the
211  *    pointer to nodes producing the value.  If the value passes block boundaries
212  *    Phi nodes can be inserted.
213  *    Similar routines exist to manage the Memory operands: set_store and
214  *    get_store.
215  *
216  *    Several nodes produce more than one result.  An example is the Div node.
217  *    Such nodes return tuples of values.  From these individual values can be
218  *    extracted by proj nodes.
219  *
220  *    The following example illustrates the construction of a simple basic block
221  *    with two predecessors stored in variables cf_pred1 and cf_pred2, containing
222  *    the code
223  *      a = a div a;
224  *    and finally jumping to an other block.  The variable a got the local_val_nr
225  *    42 by the frontend.
226  *
227  *    ir_node *this_block, *cf_pred1, *cf_pred2, *a_val, *mem, *div, *res, *cf_op;
228  *
229  *    this_block = new_immBlock();
230  *    add_immBlock_pred(this_block, cf_pred1);
231  *    add_immBlock_pred(this_block, cf_pred2);
232  *    mature_immBlock(this_block);
233  *    a_val = get_value(42, mode_Iu);
234  *    mem = get_store();
235  *    div = new_Div(mem, a_val, a_val);
236  *    mem = new_Proj(div, mode_M, 0);   * for the numbers for Proj see docu *
237  *    res = new_Proj(div, mode_Iu, 2);
238  *    set_store(mem);
239  *    set_value(res, 42);
240  *    cf_op = new_Jmp();
241  *
242  *    For further information look at the documentation of the nodes and
243  *    constructors and at the paragraph COPING WITH DATA OBJECTS at the
244  *    end of this documentation.
245  *
246  *    The comfortable interface contains the following routines further explained
247  *    below:
248  *
249  *    ir_node *new_immBlock (void);
250  *    ir_node *new_Start    (void);
251  *    ir_node *new_End      (void);
252  *    ir_node *new_Jmp      (void);
253  *    ir_node *new_IJmp     (ir_node *tgt);
254  *    ir_node *new_Cond     (ir_node *c);
255  *    ir_node *new_Return   (ir_node *store, int arity, ir_node **in);
256  *    ir_node *new_Const    (ir_mode *mode, tarval *con);
257  *    ir_node *new_SymConst (symconst_symbol value, symconst_kind kind);
258  *    ir_node *new_simpleSel (ir_node *store, ir_node *objptr, entity *ent);
259  *    ir_node *new_Sel    (ir_node *store, ir_node *objptr, int arity,
260  *                         ir_node **in, entity *ent);
261  *    ir_node *new_Call   (ir_node *store, ir_node *callee, int arity,
262  *                 ir_node **in, type_method *type);
263  *    ir_node *new_Add    (ir_node *op1, ir_node *op2, ir_mode *mode);
264  *    ir_node *new_Sub    (ir_node *op1, ir_node *op2, ir_mode *mode);
265  *    ir_node *new_Minus  (ir_node *op,  ir_mode *mode);
266  *    ir_node *new_Mul    (ir_node *op1, ir_node *op2, ir_mode *mode);
267  *    ir_node *new_Quot   (ir_node *memop, ir_node *op1, ir_node *op2);
268  *    ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2);
269  *    ir_node *new_Div    (ir_node *memop, ir_node *op1, ir_node *op2);
270  *    ir_node *new_Mod    (ir_node *memop, ir_node *op1, ir_node *op2);
271  *    ir_node *new_Abs    (ir_node *op,                ir_mode *mode);
272  *    ir_node *new_And    (ir_node *op1, ir_node *op2, ir_mode *mode);
273  *    ir_node *new_Or     (ir_node *op1, ir_node *op2, ir_mode *mode);
274  *    ir_node *new_Eor    (ir_node *op1, ir_node *op2, ir_mode *mode);
275  *    ir_node *new_Not    (ir_node *op,                ir_mode *mode);
276  *    ir_node *new_Shl    (ir_node *op,  ir_node *k,   ir_mode *mode);
277  *    ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
278  *    ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
279  *    ir_node *new_Rot    (ir_node *op,  ir_node *k,   ir_mode *mode);
280  *    ir_node *new_Cmp    (ir_node *op1, ir_node *op2);
281  *    ir_node *new_Conv   (ir_node *op, ir_mode *mode);
282  *    ir_node *new_Cast   (ir_node *op, ir_type *to_tp);
283  *    ir_node *new_Carry  (ir_node *op1, ir_node *op2, ir_mode *mode);
284  *    ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode);
285  *    ir_node *new_Load   (ir_node *store, ir_node *addr, ir_mode *mode);
286  *    ir_node *new_Store  (ir_node *store, ir_node *addr, ir_node *val);
287  *    ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
288  *                         where_alloc where);
289  *    ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
290  *               ir_type *free_type, where_alloc where);
291  *    ir_node *new_Proj   (ir_node *arg, ir_mode *mode, long proj);
292  *    ir_node *new_NoMem  (void);
293  *    ir_node *new_Mux    (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
294  *    ir_node *new_CopyB  (ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
295  *    ir_node *new_InstOf (ir_node *store, ir_node obj, ir_type *ent);
296  *    ir_node *new_Raise  (ir_node *store, ir_node *obj);
297  *    ir_node *new_Bound  (ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
298  *
299  *    void add_immBlock_pred (ir_node *block, ir_node *jmp);
300  *    void mature_immBlock (ir_node *block);
301  *    void set_cur_block (ir_node *target);
302  *    ir_node *get_value (int pos, ir_mode *mode);
303  *    void set_value (int pos, ir_node *value);
304  *    ir_node *get_store (void);
305  *    void set_store (ir_node *store);
306  *    keep_alive (ir_node ka)
307  *
308  *    IR_NODES AND CONSTRUCTORS FOR IR_NODES
309  *    =======================================
310  *
311  *    All ir_nodes are defined by a common data structure.  They are distinguished
312  *    by their opcode and differ in the number of their attributes.
313  *
314  *    The constructor for the block node sets current_block to itself.
315  *    Const nodes are always added to the start block.
316  *    All other constructors add the created node to the current_block.
317  *    swich_block(block) allows to set the current block to block.
318  *
319  *    Watch for my inconsistent use of input and predecessor (dataflow view)
320  *    and `the node points to' (implementation view).
321  *
322  *    The following description of the nodes lists four properties them if these
323  *    are of interest:
324  *     - the parameters to the constructor
325  *     - the inputs of the Firm node
326  *     - the outputs of the Firm node
327  *     - attributes to the node
328  *
329  *    ------------
330  *
331  *    ir_node *new_immBlock (void)
332  *    ----------------------------
333  *
334  *    Creates a new block.  Sets current_block to itself.  When a new block is
335  *    created it cannot be known how many predecessors this block will have in the
336  *    control flow graph. Therefore the list of inputs can not be fixed at
337  *    creation.  Predecessors can be added with add_immBlock_pred (block, control flow
338  *    operation).  With every added predecessor the number of inputs to Phi nodes
339  *    also changes.
340  *
341  *    The block can be completed by mature_immBlock(block) if all predecessors are
342  *    known.  If several blocks are built at once, mature_immBlock can only be called
343  *    after set_value has been called for all values that are life at the end
344  *    of the block.  This is necessary so that Phi nodes created mature_immBlock
345  *    get the right predecessors in case of cyclic dependencies.  If all set_values
346  *    of this block are called after maturing it and before calling get_value
347  *    in some block that is control flow dependent on this block, the construction
348  *    is correct.
349  *
350  *    Example for faulty ir construction:  (draw the graph on a paper and you'll
351  *                                          get it ;-)
352  *
353  *      block_before_loop = new_block();
354  *      set_value(x);
355  *      mature_immBlock(block_before_loop);
356  *      before2header = new_Jmp;
357  *
358  *      loop_header = new_block ();
359  *      header2body - new_Jmp();
360  *
361  *      loop_body = new_block ();
362  *      body2header = new_Jmp();
363  *
364  *      add_immBlock_pred(loop_header, before2header);
365  *      add_immBlock_pred(loop_header, body2header);
366  *      add_immBlock_pred(loop_body, header2body);
367  *
368  *      mature_immBlock(loop_header);
369  *      mature_immBlock(loop_body);
370  *
371  *      get_value(loop_body, x);   //  gets the Phi in loop_header
372  *      set_value(loop_header, x); //  sets the value the above get_value should
373  *                                 //  have returned!!!
374  *
375  *    Mature_immBlock also fixes the number of inputs to the Phi nodes.  Mature_immBlock
376  *    should be called as early as possible, as afterwards the generation of Phi
377  *   nodes is more efficient.
378  *
379  *    Inputs:
380  *      There is an input for each control flow predecessor of the block.
381  *      The input points to an instruction producing an output of type X.
382  *      Possible predecessors:  Start, Jmp, Cond, Raise or Return or any node
383  *      possibly causing an exception.  (Often the real predecessors are Projs.)
384  *    Output:
385  *      Mode BB (R), all nodes belonging to this block should consume this output.
386  *      As they are strict (except Block and Phi node) it is a necessary condition
387  *      that the block node executed before any other node in this block executes.
388  *    Attributes:
389  *      block.matured  Indicates whether the block is mature.
390  *      block.**graph_arr
391  *                      This attribute contains all local values valid in this
392  *                      block. This is needed to build the Phi nodes and removed
393  *                      if the graph is complete.  This field is used by the
394  *              internal construction algorithm and should not be accessed
395  *              from outside.
396  *
397  *
398  *    ir_node *new_Block (int arity, ir_node **in)
399  *    --------------------------------------------
400  *
401  *    Creates a new Block with the given list of predecessors.  This block
402  *    is mature.  As other constructors calls optimization and vrfy for the
403  *    block.  If one of the predecessors is Unknown (as it has to be filled in
404  *    later) optimizations are skipped.  This is necessary to
405  *    construct Blocks in loops.  Leaving Unknown in the Block after finishing
406  *    the construction may have strange effects, especially for interprocedural
407  *    representation and analysis.
408  *
409  *
410  *    CONTROL FLOW OPERATIONS
411  *    -----------------------
412  *
413  *    In each block there must be exactly one of the control flow
414  *    operations Start, End, Jmp, Cond, Return or Raise.  The output of a
415  *    control flow operation points to the block to be executed next.
416  *
417  *    ir_node *new_Start (void)
418  *    -------------------------
419  *
420  *    Creates a start node.  Not actually needed public.  There is only one such
421  *   node in each procedure which is automatically created by new_ir_graph.
422  *
423  *    Inputs:
424  *      No inputs except the block it belogns to.
425  *    Output:
426  *      A tuple of 4 (5, 6) distinct values. These are labeled by the following
427  *      projection numbers (pn_Start):
428  *      * pn_Start_X_initial_exec    mode X, points to the first block to be exe *                                   cuted.
429  *      * pn_Start_M                 mode M, the global store
430  *      * pn_Start_P_frame_base      mode P, a pointer to the base of the proce  *                                   dures stack frame.
431  *      * pn_Start_P_globals         mode P, a pointer to the part of the memory *                                   containing_all_ global things.
432  *      * pn_Start_T_args            mode T, a tuple containing all arguments of *                                   the procedure.
433  *
434  *
435  *    ir_node *new_End (void)
436  *    -----------------------
437  *
438  *    Creates an end node.  Not actually needed public.  There is only one such
439  *   node in each procedure which is automatically created by new_ir_graph.
440  *
441  *    Inputs:
442  *      No inputs except the block it belongs to.
443  *    Output:
444  *      No output.
445  *
446  *    ir_node *new_Jmp (void)
447  *    -----------------------
448  *
449  *    Creates a Jmp node.
450  *
451  *    Inputs:
452  *      The block the node belongs to
453  *    Output:
454  *      Control flow to the next block.
455  *
456  *    ir_node *new_IJmp (ir_node *tgt)
457  *    -----------------------
458  *
459  *    Creates an IJmp node.
460  *
461  *    Inputs:
462  *      The node that represents the target jump address
463  *    Output:
464  *      Control flow to an unknown target, must be pinned by
465  *      the End node.
466  *
467  *    ir_node *new_Cond (ir_node *c)
468  *    ------------------------------
469  *
470  *    Creates a Cond node.  There are two versions of this node.
471  *
472  *    The Boolean Cond:
473  *    Input:
474  *      A value of mode b.
475  *    Output:
476  *      A tuple of two control flows.  The first is taken if the input is
477  *      false, the second if it is true.
478  *
479  *    The Switch Cond:
480  *    Input:
481  *      A value of mode I_u. (i)
482  *    Output:
483  *      A tuple of n control flows.  If the Cond's input is i, control
484  *      flow will procede along output i. If the input is >= n control
485  *      flow proceeds along output n.
486  *
487  *    ir_node *new_Return (ir_node *store, int arity, ir_node **in)
488  *    -------------------------------------------------------------
489  *
490  *    The return node has as inputs the results of the procedure.  It
491  *    passes the control flow to the end_block.
492  *
493  *    Inputs:
494  *      The memory state.
495  *      All results.
496  *    Output
497  *      Control flow to the end block.
498  *
499  *    ---------
500  *
501  *    ir_node *new_Const (ir_mode *mode, tarval *con)
502  *    -----------------------------------------------
503  *
504  *    Creates a constant in the constant table and adds a Const node
505  *    returning this value to the start block.
506  *
507  *    Parameters:
508  *      *mode            The mode of the constant.
509  *      *con             Points to an entry in the constant table.
510  *                       This pointer is added to the attributes of
511  *                       the node (self->attr.con)
512  *    Inputs:
513  *      No inputs except the block it belogns to.
514  *    Output:
515  *      The constant value.
516  *    Attribute:
517  *      attr.con   A tarval* pointer to the proper entry in the constant
518  *                 table.
519  *
520  *    ir_node *new_SymConst (union symconst_symbol value, symconst_addr_ent kind)
521  *    ---------------------------------------------------------------------------
522  *
523  *    There are three kinds of symbolic constants:
524  *     symconst_type_tag  The symbolic constant represents a type tag.
525  *     symconst_size      The symbolic constant represents the size of a class.
526  *     symconst_addr_name Information for the linker, e.g. the name of a global
527  *                variable.
528  *    To represent a pointer to an entity that is represented by an entity
529  *    datastructure don't use
530  *      new_SymConst((type_or_id*)get_entity_ld_ident(ent), symconst_addr_name);.
531  *    Use a real const instead:
532  *      new_SymConst(mode_P_mach, tarval_p_from_entity(ent));
533  *    This makes the Constant independent of name changes of the entity due to
534  *    mangling.
535  *
536  *    Parameters
537  *      kind        The kind of the symbolic constant: type_tag, size or link_info.
538  *      *type_or_id Points to the type the tag stands for or to the type
539  *                  whose size is represented by the constant or to an ident
540  *                  representing the linkage info.
541  *
542  *    Inputs:
543  *      No inputs except the block it belogns to.
544  *    Output:
545  *      An unsigned integer (I_u) or a pointer (P).
546  *
547  *    Attributes:
548  *      attr.i.num       The symconst_addr_ent, i.e. one of
549  *                        -symconst_type_tag
550  *                        -symconst_size
551  *                - symconst_addr_name
552  *        If the attr.i.num is symconst_type_tag or symconst_size, the node contains an attribute
553  *      attr.i.*type,    a pointer to a type_class.  The mode of the node is mode_Is.
554  *        if it is linkage_ptr_info it contains
555  *      attr.i.*ptrinfo,  an ident holding information for the linker.  The mode
556  *        of the node is mode_P_mach.
557  *
558  *    ---------------
559  *
560  *    ir_node *new_simpleSel (ir_node *store, ir_node *frame, entity *sel)
561  *    --------------------------------------------------------------------
562  *
563  *
564  *    Selects an entity from a compound type. This entity can be a field or
565  *    a method.
566  *
567  *    Parameters:
568  *      *store     The memory in which the object the entity should be selected
569  *                 from is allocated.
570  *      *frame     The pointer to the object.
571  *      *sel       The entity to select.
572  *
573  *    Inputs:
574  *      The memory containing the object.
575  *      A pointer to the object.
576  *      An unsigned integer.
577  *    Output:
578  *      A pointer to the selected entity.
579  *    Attributes:
580  *      attr.sel   Pointer to the entity
581  *
582  *
583  *    ir_node *new_Sel (ir_node *store, ir_node *frame, int arity, ir_node **in,
584  *    --------------------------------------------------------------------------
585  *                      entity *sel)
586  *                      ------------
587  *
588  *    Selects a field from an array type.  The entity has as owner the array, as
589  *    type the arrays element type.  The indices to access an array element are
590  *    given also.
591  *
592  *    Parameters:
593  *      *store     The memory in which the object the entity should be selected from
594  *                 is allocated.
595  *      *frame     The pointer to the object.
596  *      *arity     number of array indices.
597  *      *in        array with index inputs to the node.
598  *      *sel       The entity to select.
599  *
600  *    Inputs:
601  *      The memory containing the object.
602  *      A pointer to the object.
603  *      As much unsigned integer as there are array expressions.
604  *    Output:
605  *      A pointer to the selected entity.
606  *    Attributes:
607  *      attr.sel   Pointer to the entity
608  *
609  *    The constructors new_Sel and new_simpleSel generate the same ir nodes.
610  *    simpleSel just sets the arity of the index inputs to zero.
611  *
612  *
613  *    ARITHMETIC OPERATIONS
614  *    ---------------------
615  *
616  *    ir_node *new_Call (ir_node *store, ir_node *callee, int arity, ir_node **in,
617  *    ----------------------------------------------------------------------------
618  *                       type_method *type)
619  *                       ------------------
620  *
621  *    Creates a procedure call.
622  *
623  *    Parameters
624  *      *store           The actual store.
625  *      *callee          A pointer to the called procedure.
626  *      arity            The number of procedure parameters.
627  *      **in             An array with the pointers to the parameters.
628  *                       The constructor copies this array.
629  *      *type            Type information of the procedure called.
630  *
631  *    Inputs:
632  *      The store, the callee and the parameters.
633  *    Output:
634  *      A tuple containing the eventually changed store and the procedure
635  *      results.
636  *    Attributes:
637  *      attr.call        Contains the type information for the procedure.
638  *
639  *
640  *    ir_node *new_Add (ir_node *op1, ir_node *op2, ir_mode *mode)
641  *    ------------------------------------------------------------
642  *
643  *    Trivial.
644  *
645  *    ir_node *new_Sub (ir_node *op1, ir_node *op2, ir_mode *mode)
646  *    ------------------------------------------------------------
647  *
648  *    Trivial.
649  *
650  *    ir_node *new_Minus (ir_node *op, ir_mode *mode)
651  *    -----------------------------------------------
652  *
653  *    Unary Minus operations on integer and floating point values.
654  *
655  *    ir_node *new_Mul (ir_node *op1, ir_node *op2, ir_mode *mode)
656  *    ------------------------------------------------------------
657  *
658  *    Trivial.
659  *
660  *    ir_node *new_Quot (ir_node *memop, ir_node *op1, ir_node *op2)
661  *    --------------------------------------------------------------
662  *
663  *    Quot performs exact division of floating point numbers.  It's mode
664  *    is Tuple, the mode of the result must be annotated to the Proj
665  *    that extracts the result of the arithmetic operations.
666  *
667  *    Inputs:
668  *      The store needed to model exceptions and the two operands.
669  *    Output:
670  *      A tuple contaning a memory and a execution for modeling exceptions
671  *      and the result of the arithmetic operation.
672  *
673  *    ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2)
674  *    ----------------------------------------------------------------
675  *
676  *    Performs Div and Mod on interger values.
677  *
678  *    Output:
679  *      A tuple contaning a memory and a execution for modeling exceptions
680  *      and the two result of the arithmetic operations.
681  *
682  *    ir_node *new_Div (ir_node *memop, ir_node *op1, ir_node *op2)
683  *    -------------------------------------------------------------
684  *
685  *    Trivial.
686  *
687  *    ir_node *new_Mod (ir_node *memop, ir_node *op1, ir_node *op2)
688  *    -------------------------------------------------------------
689  *
690  *    Trivial.
691  *
692  *    ir_node *new_Abs (ir_node *op, ir_mode *mode)
693  *    ---------------------------------------------
694  *
695  *    Trivial.
696  *
697  *    ir_node *new_And (ir_node *op1, ir_node *op2, ir_mode *mode)
698  *    ------------------------------------------------------------
699  *
700  *    Trivial.
701  *
702  *    ir_node *new_Or (ir_node *op1, ir_node *op2, ir_mode *mode)
703  *    -----------------------------------------------------------
704  *
705  *    Trivial.
706  *
707  *    ir_node *new_Eor (ir_node *op1, ir_node *op2, ir_mode *mode)
708  *    ------------------------------------------------------------
709  *
710  *    Trivial.
711  *
712  *    ir_node *new_Not (ir_node *op, ir_mode *mode)
713  *    ---------------------------------------------
714  *
715  *    This node constructs a constant where all bits are set to one
716  *    and a Eor of this constant and the operator.  This simulates a
717  *    Not operation.
718  *
719  *    ir_node *new_Shl (ir_node *op, ir_node *k, ir_mode *mode)
720  *    ---------------------------------------------------------
721  *
722  *    Trivial.
723  *
724  *    ir_node *new_Shr (ir_node *op, ir_node *k, ir_mode *mode)
725  *    ---------------------------------------------------------
726  *
727  *    Logic shift right, i.e., zero extended.
728  *
729  *
730  *    ir_node *new_Shrs (ir_node *op, ir_node *k, ir_mode *mode)
731  *    ----------------------------------------------------------
732  *
733  *    Arithmetic shift right, i.e., sign extended.
734  *
735  *    ir_node *new_Rot (ir_node *op, ir_node *k, ir_mode *mode)
736  *    ---------------------------------------------------------
737  *
738  *    Rotates the operand to the (right??) by k bits.
739  *
740  *    ir_node *new_Carry (ir_node *op1, ir_node *op2, ir_mode *mode)
741  *    ------------------------------------------------------------
742  *
743  *    Calculates the Carry value for integer addition. Used only
744  *    in lowering code.
745  *
746  *    ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode)
747  *    ------------------------------------------------------------
748  *
749  *    Calculates the Borrow value for integer substraction. Used only
750  *    in lowering code.
751  *
752  *    ir_node *new_Conv (ir_node *op, ir_mode *mode)
753  *    ---------------------------------------------
754  *
755  *    Mode conversion.  For allowed conversions see UKA Tech Report
756  *    1999-14.
757  *
758  *    ir_node *new_Cmp (ir_node *op1, ir_node *op2)
759  *    ---------------------------------------------
760  *
761  *    Input:
762  *      The two values to be compared.
763  *    Output:
764  *      A 16-tuple containing the results of the 16 different comparisons.
765  *      The following is a list giving the comparisons and a projection
766  *      number (pn_Cmp) to use in Proj nodes to extract the proper result.
767  *        pn_Cmp_False false
768  *        pn_Cmp_Eq    equal
769  *        pn_Cmp_Lt    less
770  *        pn_Cmp_Le    less or equal
771  *        pn_Cmp_Gt    greater
772  *        pn_Cmp_Ge    greater of equal
773  *        pn_Cmp_Lg    less or greater
774  *        pn_Cmp_Leg   less, equal or greater = ordered
775  *        pn_Cmp_Uo    unordered
776  *        pn_Cmp_Ue    unordered or equal
777  *        pn_Cmp_Ul    unordered or less
778  *        pn_Cmp_Ule   unordered, less or equal
779  *        pn_Cmp_Ug    unordered or greater
780  *        pn_Cmp_Uge   unordered, greater or equal
781  *        pn_Cmp_Ne    unordered, less or greater = not equal
782  *        pn_Cmp_True  true
783  *
784  *
785  *
786  *    ------------
787  *
788  *    In general, Phi nodes are automaitcally inserted.  In some cases, if
789  *    all predecessors of a block are known, an explicit Phi node constructor
790  *    is needed.  E.g., to construct a FIRM graph for a statement as
791  *      a = (b==c) ? 2 : 5;
792  *
793  *    ir_node *new_Phi (int arity, ir_node **in, ir_mode *mode)
794  *    ---------------------------------------------------------
795  *
796  *    Creates a Phi node. The in's order has to correspond to the order
797  *    of in's of current_block.  This is not checked by the library!
798  *    If one of the predecessors is Unknown (as it has to be filled in
799  *    later) optimizations are skipped.  This is necessary to
800  *    construct Phi nodes in loops.  Leaving Unknown in the Phi after finishing
801  *    the construction may have strange effects, especially for interprocedural
802  *    representation and analysis.
803  *
804  *    Parameter
805  *      arity            number of predecessors
806  *      **in             array with predecessors
807  *      *mode            The mode of it's inputs and output.
808  *    Inputs:
809  *      A Phi node has as many inputs as the block it belongs to.
810  *      Each input points to a definition of the same value on a
811  *      different path in the control flow.
812  *    Output
813  *      The definition valid in this block.
814  *
815  *    ir_node *new_Mux (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode)
816  *    -----------------------------------------------------------------------------
817  *
818  *    Creates a Mux node. This node implements the following semantic:
819  *    If the sel node (which must be of mode_b) evaluates to true, its value is
820  *    ir_true, else ir_false;
821  *
822  *
823  *    OPERATIONS TO MANAGE MEMORY EXPLICITLY
824  *    --------------------------------------
825  *
826  *    ir_node *new_Load (ir_node *store, ir_node *addr, ir_mode *mode)
827  *    ----------------------------------------------------------------
828  *
829  *    The Load operation reads a value from memory.
830  *
831  *    Parameters:
832  *    *store        The current memory.
833  *    *addr         A pointer to the variable to be read in this memory.
834  *    *mode         The mode of the value to be loaded.
835  *
836  *    Inputs:
837  *      The memory and a pointer to a variable in this memory.
838  *    Output:
839  *      A tuple of the memory, a control flow to be taken in case of
840  *      an exception and the loaded value.
841  *
842  *    ir_node *new_Store (ir_node *store, ir_node *addr, ir_node *val)
843  *    ----------------------------------------------------------------
844  *
845  *    The Store operation writes a value to a variable in memory.
846  *
847  *    Inputs:
848  *      The memory, a pointer to a variable in this memory and the value
849  *      to write to this variable.
850  *    Output:
851  *      A tuple of the changed memory and a control flow to be taken in
852  *      case of an exception.
853  *
854  *    ir_node *new_Alloc (ir_node *store, ir_node *size, ir_type *alloc_type,
855  *    -----------------------------------------------------------------------
856  *                        where_alloc where)
857  *                        ------------------
858  *
859  *    The Alloc node allocates a new variable.  It can be specified whether the
860  *    variable should be allocated to the stack or to the heap.
861  *
862  *    Parameters:
863  *      *store       The memory which shall contain the new variable.
864  *      **    *size        The number of bytes to allocate. Old. **
865  *      *size        We decided that the size easily can be derived from the type.
866  *                   This field is for allocating arrays, i.e., it gives the multiple
867  *           of the size of alloc_type to allocate memory for.
868  *      *alloc_type  The type of the allocated variable.
869  *      where        Where to allocate the variable, either heap_alloc or stack_alloc.
870  *
871  *    Inputs:
872  *      A memory and an unsigned integer.
873  *    Output:
874  *      A tuple of the changed memory, a control flow to be taken in
875  *      case of an exception and the pointer to the new variable.
876  *    Attributes:
877  *      a.where          Indicates where the variable is allocated.
878  *      a.*type          A pointer to the class the allocated data object
879  *                       belongs to.
880  *
881  *    ir_node *new_Free (ir_node *store, ir_node *ptr, ir_node *size, ir_type *free_type,
882  *    -----------------------------------------------------------------------------------
883  *                        where_alloc where)
884  *                        ------------------
885  *
886  *    The Free node frees memory of the given variable.
887  *
888  *    Parameters:
889  *      *store       The memory which shall contain the new variable.
890  *      *ptr         The pointer to the object to free.
891  *      *size        The number of objects of type free_type to free in a sequence.
892  *      *free_type   The type of the freed variable.
893  *      where        Where the variable was allocated, either heap_alloc or stack_alloc.
894  *
895  *    Inputs:
896  *      A memory, a pointer and an unsigned integer.
897  *    Output:
898  *      The changed memory.
899  *    Attributes:
900  *      f.*type          A pointer to the type information of the freed data object.
901  *
902  *    Not Implemented!
903  *
904  *    ir_node *new_Sync (int arity, ir_node **in)
905  *    -------------------------------------------
906  *
907  *    The Sync operation unifies several partial memory blocks.  These blocks
908  *    have to be pairwise disjunct or the values in common locations have to
909  *    be identical.  This operation allows to specify all operations that eventually
910  *    need several partial memory blocks as input with a single entrance by
911  *    unifying the memories with a preceding Sync operation.
912  *
913  *    Parameters
914  *      arity    The number of memories to synchronize.
915  *      **in     An array of pointers to nodes that produce an output of
916  *               type memory.
917  *    Inputs
918  *      Several memories.
919  *    Output
920  *      The unified memory.
921  *
922  *
923  *    SPECIAL OPERATIONS
924  *    ------------------
925  *
926  *    ir_node *new_Bad (void)
927  *    -----------------------
928  *
929  *    Returns the unique Bad node current_ir_graph->bad.
930  *    This node is used to express results of dead code elimination.
931  *
932  *    ir_node *new_NoMem (void)
933  *    -----------------------------------------------------------------------------------
934  *
935  *    Returns the unique NoMem node current_ir_graph->no_mem.
936  *    This node is used as input for operations that need a Memory, but do not
937  *    change it like Div by const != 0, analyzed calls etc.
938  *
939  *    ir_node *new_Proj (ir_node *arg, ir_mode *mode, long proj)
940  *    ----------------------------------------------------------
941  *
942  *    Selects one entry of a tuple.  This is a hidden edge with attributes.
943  *
944  *    Parameters
945  *      *arg      A node producing a tuple.
946  *      *mode     The mode of the value to project.
947  *      proj      The position of the value in the tuple.
948  *    Input:
949  *      The tuple.
950  *    Output:
951  *      The value.
952  *
953  *    ir_node *new_Tuple (int arity, ir_node **in)
954  *    --------------------------------------------
955  *
956  *    Builds a Tuple from single values.  This is needed to implement
957  *    optimizations that remove a node that produced a tuple.  The node can be
958  *    replaced by the Tuple operation so that the following Proj nodes have not to
959  *    be changed.  (They are hard to find due to the implementation with pointers
960  *    in only one direction.)  The Tuple node is smaller than any other
961  *    node, so that a node can be changed into a Tuple by just changing it's
962  *    opcode and giving it a new in array.
963  *
964  *    Parameters
965  *      arity    The number of tuple elements.
966  *      **in     An array containing pointers to the nodes producing the
967  *               tuple elements.
968  *
969  *    ir_node *new_Id (ir_node *val, ir_mode *mode)
970  *    ---------------------------------------------
971  *
972  *    The single output of the Id operation is it's input.  Also needed
973  *    for optimizations.
974  *
975  *
976  *    HIGH LEVEL OPERATIONS
977  *    ---------------------
978  *
979  *    ir_node *new_CopyB (ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type)
980  *    -----------------------------------------------------------------------------------
981  *
982  *    Describes a high level block copy of a compound type from address src to
983  *    address dst. Must be lowered to a Call to a runtime memory copy function.
984  *
985  *
986  *    HIGH LEVEL OPERATIONS: Exception Support
987  *    ----------------------------------------
988  *    See TechReport 1999-14, chapter Exceptions.
989  *
990  *    ir_node *new_InstOf(ir_node *store, ir_node *ptr, ir_type *type);
991  *    -----------------------------------------------------------------------------------
992  *
993  *    Describes a high level type check. Must be lowered to a Call to a runtime check
994  *    function.
995  *
996  *    ir_node *new_Raise (ir_node *store, ir_node *obj)
997  *    -------------------------------------------------
998  *
999  *    Raises an exception.  Unconditional change of control flow.  Writes
1000  *    an explicit Except variable to memory to pass it to the exception
1001  *    handler.  Must be lowered to a Call to a runtime check
1002  *    function.
1003  *
1004  *    Inputs:
1005  *      The memory state.
1006  *      A pointer to the Except variable.
1007  *    Output:
1008  *      A tuple of control flow and the changed memory state.  The control flow
1009  *      points to the exception handler if it is definied in this procedure,
1010  *      else it points to the end_block.
1011  *
1012  *    ir_node *new_Bound  (ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
1013  *    -----------------------------------------------------------------------------------
1014  *
1015  *    Describes a high level bounds check. Must be lowered to a Call to a runtime check
1016  *    function.
1017  *
1018  *
1019  *    COPING WITH DATA OBJECTS
1020  *    ========================
1021  *
1022  *    Two kinds of data objects have to be distinguished for generating
1023  *    FIRM.  First there are local variables other than arrays that are
1024  *    known to be alias free.  Second there are all other data objects.
1025  *    For the first a common SSA representation is built, the second
1026  *    are modeled by saving them to memory.  The memory is treated as
1027  *    a single local variable, the alias problem is hidden in the
1028  *    content of this variable.
1029  *
1030  *    All values known in a Block are listed in the block's attribute,
1031  *    block.**graph_arr which is used to automatically insert Phi nodes.
1032  *    The following two funcions can be used to add a newly computed value
1033  *    to the array, or to get the producer of a value, i.e., the current
1034  *    live value.
1035  *
1036  *    inline void set_value (int pos, ir_node *value)
1037  *    -----------------------------------------------
1038  *
1039  *    Has to be called for every assignment to a local variable.  It
1040  *    adds the value to the array of used values at position pos.  Pos
1041  *    has to be a unique identifier for an entry in the procedure's
1042  *    definition table.  It can be used to access the value again.
1043  *    Requires current_block to be set correctly.
1044  *
1045  *    ir_node *get_value (int pos, ir_mode *mode)
1046  *    -------------------------------------------
1047  *
1048  *    Returns the node defining the value referred to by pos. If the
1049  *    value is not defined in this block a Phi node is generated and
1050  *    all definitions reaching this Phi node are collected.  It can
1051  *    happen that the algorithm allocates an unnecessary Phi node,
1052  *    e.g. if there is only one definition of this value, but this
1053  *    definition reaches the currend block on several different
1054  *    paths.  This Phi node will be eliminated if optimizations are
1055  *    turned on right after it's creation.
1056  *    Requires current_block to be set correctly.
1057  *
1058  *    There are two special routines for the global store:
1059  *
1060  *    void set_store (ir_node *store)
1061  *    -------------------------------
1062  *
1063  *    Adds the store to the array of known values at a reserved
1064  *    position.
1065  *    Requires current_block to be set correctly.
1066  *
1067  *    ir_node *get_store (void)
1068  *    -------------------------
1069  *
1070  *    Returns the node defining the actual store.
1071  *    Requires current_block to be set correctly.
1072  *
1073  *
1074  *    inline void keep_alive (ir_node *ka)
1075  *    ------------------------------------
1076  *
1077  *    Keep this node alive because it is (might be) not in the control
1078  *    flow from Start to End.  Adds the node to the list in the end
1079  *   node.
1080  *
1081  */
1082 #ifndef _IRCONS_H_
1083 #define _IRCONS_H_
1084
1085 #include "firm_common.h"
1086 #include "irnode.h"
1087 #include "dbginfo.h"
1088
1089 /*-------------------------------------------------------------------------*/
1090 /* The raw interface                                                       */
1091 /*-------------------------------------------------------------------------*/
1092
1093 /** Constructor for a Block node.
1094  *
1095  * Constructs a mature block with the given predecessors.  Use Unknown
1096  * nodes as predecessors to construct a block if the number of
1097  * predecessors is known, but not the predecessors themselves.  This
1098  * constructor does not set current_block.  It not be used with
1099  * automatic Phi node construction.
1100  *
1101  * @param *db    A Pointer for  debug information.
1102  * @param irg    The ir graph the block belongs to.
1103  * @param arity  The number of control predecessors.
1104  * @param in[]   An array of control predecessors.  The length of
1105  *               the array must be 'arity'.  The constructor copies this array.
1106  */
1107 ir_node *new_rd_Block  (dbg_info *db, ir_graph *irg,  int arity, ir_node *in[]);
1108
1109 /** Constructor for a Start node.
1110  *
1111  * @param *db    A pointer for debug information.
1112  * @param *irg   The ir graph the node belongs to.
1113  * @param *block The ir block the node belongs to.
1114  */
1115 ir_node *new_rd_Start  (dbg_info *db, ir_graph *irg, ir_node *block);
1116
1117 /** Constructor for a End node.
1118  *
1119  * @param *db    A pointer for  debug information.
1120  * @param *irg   The ir graph the node  belongs to.
1121  * @param *block The ir block the node belongs to.
1122  */
1123 ir_node *new_rd_End    (dbg_info *db, ir_graph *irg, ir_node *block);
1124
1125 /** Constructor for a Jmp node.
1126  *
1127  * Jmp represents control flow to a single control successor.
1128  *
1129  * @param *db     A pointer for debug information.
1130  * @param *irg    The ir graph the node belongs to.
1131  * @param *block  The ir block the node belongs to.
1132  */
1133 ir_node *new_rd_Jmp    (dbg_info *db, ir_graph *irg, ir_node *block);
1134
1135 /** Constructor for an IJmp node.
1136  *
1137  * IJmp represents control flow to a single control successor not
1138  * statically known i.e. an indirect Jmp.
1139  *
1140  * @param *db     A pointer for debug information.
1141  * @param *irg    The ir graph the node belongs to.
1142  * @param *block  The ir block the node belongs to.
1143  * @param *tgt    The ir node representing the target address.
1144  */
1145 ir_node *new_rd_IJmp   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *tgt);
1146
1147 /** Constructor for a Break node.
1148  *
1149  * Break represents control flow to a single control successor just as Jmp.
1150  * The blocks separated by a break may not be concatenated by an optimization.
1151  * It is used for the interprocedural representation where blocks are parted
1152  * behind Call nodes to represent the control flow to called procedures.
1153  *
1154  * @param *db     A pointer for debug information.
1155  * @param *irg    The ir graph the node belong to.
1156  * @param *block  The block the node belong to.
1157  */
1158 ir_node *new_rd_Break  (dbg_info *db, ir_graph *irg, ir_node *block);
1159
1160 /** Constructor for a Cond node.
1161  *
1162  * If c is mode_b represents a conditional branch (if/else). If c is
1163  * mode_Is/mode_Iu (?) represents a switch.  (Allocates dense Cond
1164  * node, default Proj is 0.)
1165  *
1166  * This is not consistent:  Input to Cond is Is, Proj has as proj number
1167  * longs.
1168  *
1169  * @param *db    A pointer for debug information.
1170  * @param *irg   The ir graph the node  belongs to.
1171  * @param *block The ir block the node belongs to.
1172  * @param *c     The conditions parameter. Can be of mode b or I_u.
1173  */
1174 ir_node *new_rd_Cond   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *c);
1175
1176 /** Constructor for a Return node.
1177  *
1178  * Returns the memory an zero or more return values.  Only node that
1179  * can end regular control flow.
1180  *
1181  * @param *db    A pointer for debug information.
1182  * @param *irg   The ir graph the node  belongs to.
1183  * @param *block The ir block the node belongs to.
1184  * @param *store The state of memory.
1185  * @param arity  Number of return values.
1186  * @param *in    Array of length arity with return values.  The constructor copies this array.
1187  */
1188 ir_node *new_rd_Return (dbg_info *db, ir_graph *irg, ir_node *block,
1189                         ir_node *store, int arity, ir_node *in[]);
1190
1191 /** Constructor for a Const_type node.
1192  *
1193  * The constant represents a target value.  This constructor sets high
1194  * level type information for the constant value.
1195  *
1196  * @param *db    A pointer for debug information.
1197  * @param *irg   The ir graph the node  belongs to.
1198  * @param *block The ir block the node belongs to.
1199  * @param *mode  The mode of the operands and results.
1200  * @param *con   Points to an entry in the constant table.
1201  * @param *tp    The type of the constant.
1202  */
1203 ir_node *new_rd_Const_type (dbg_info *db, ir_graph *irg, ir_node *block,
1204                 ir_mode *mode, tarval *con, ir_type *tp);
1205
1206 /** Constructor for a Const node.
1207  *
1208  * Constructor for a Const node. The constant represents a target
1209  * value.  Sets the type information to type_unknown.  (No more
1210  * supported: If tv is entity derives a somehow useful type.)
1211  *
1212  * @param *db    A pointer for debug information.
1213  * @param *irg   The ir graph the node  belongs to.
1214  * @param *block The ir block the node belongs to.
1215  * @param *mode  The mode of the operands and results.
1216  * @param *con   Points to an entry in the constant table.
1217  */
1218 ir_node *new_rd_Const  (dbg_info *db, ir_graph *irg, ir_node *block,
1219                ir_mode *mode, tarval *con);
1220
1221 /** Constructor for a SymConst_type node.
1222  *
1223  *  This is the constructor for a symbolic constant.
1224  *    There are four kinds of symbolic constants:
1225  *    - type_tag  The symbolic constant represents a type tag.  The type the
1226  *                tag stands for is given explicitly.
1227  *    - size      The symbolic constant represents the size of a type.  The
1228  *                type of which the constant represents the size is given
1229  *                explicitly.
1230  *    - addr_name The symbolic constant represents the address of an entity
1231  *                (variable or method).  The variable is indicated by a name
1232  *                that is valid for linking.
1233  *    - addr_ent   The symbolic constant represents the address of an entity
1234  *                (variable or method).  The variable is given explicitly by
1235  *                a firm entity.
1236  *
1237  *    Inputs to the node:
1238  *      No inputs except the block it belongs to.
1239  *    Outputs of the node.
1240  *      An unsigned integer (I_u) or a pointer (P).
1241  *
1242  *    Mention union in declaration so that the firmjni generator recognizes that
1243  *    it can not cast the argument to an int.
1244  *
1245  * @param *db     A pointer for debug information.
1246  * @param *irg    The ir graph the node  belongs to.
1247  * @param *block  The ir block the node belongs to.
1248  * @param symkind The kind of the symbolic constant: type_tag, size, addr_name or addr_ent.
1249  * @param value   A type, entity or a ident depending on the SymConst kind.
1250  * @param tp      The source type of the constant.
1251  */
1252 ir_node *new_rd_SymConst_type (dbg_info *db, ir_graph *irg, ir_node *block, union symconst_symbol value,
1253                                symconst_kind symkind, ir_type *tp);
1254
1255 /** Constructor for a SymConst node.
1256  *
1257  *  Same as new_rd_SymConst_type, except that it sets the type to type_unknown. */
1258 ir_node *new_rd_SymConst (dbg_info *db, ir_graph *irg, ir_node *block,
1259                           union symconst_symbol value, symconst_kind symkind);
1260
1261 /** Constructor for a SymConst addr_ent node.
1262  *
1263  * Same as new_rd_SymConst_type, except that the constructor is tailored for
1264  * symconst_addr_ent.
1265  * Adds the SymConst to the start block of irg. */
1266 ir_node *new_rd_SymConst_addr_ent (dbg_info *db, ir_graph *irg, entity *symbol, ir_type *tp);
1267
1268 /** Constructor for a SymConst addr_name node.
1269  *
1270  * Same as new_rd_SymConst_type, except that the constructor is tailored for
1271  * symconst_addr_ent.
1272  * Adds the SymConst to the start block of irg. */
1273 ir_node *new_rd_SymConst_addr_name (dbg_info *db, ir_graph *irg, ident *symbol, ir_type *tp);
1274
1275 /** Constructor for a SymConst type_tag node.
1276  *
1277  * Same as new_rd_SymConst_type, except that the constructor is tailored for
1278  * symconst_addr_ent.
1279  * Adds the SymConst to the start block of irg. */
1280 ir_node *new_rd_SymConst_type_tag (dbg_info *db, ir_graph *irg, ir_type *symbol, ir_type *tp);
1281
1282 /** Constructor for a SymConst size node.
1283  *
1284  * Same as new_rd_SymConst_type, except that the constructor is tailored for
1285  * symconst_addr_ent.
1286  * Adds the SymConst to the start block of irg. */
1287 ir_node *new_rd_SymConst_size (dbg_info *db, ir_graph *irg, ir_type *symbol, ir_type *tp);
1288
1289 /** Constructor for a simpleSel node.
1290  *
1291  *  This is a shortcut for the new_rd_Sel() constructor.  To be used for
1292  *  Sel nodes that do not select from an array, i.e., have no index
1293  *  inputs.  It adds the two parameters 0, NULL.
1294  *
1295  * @param   *db        A pointer for debug information.
1296  * @param   *irg       The ir graph the node  belongs to.
1297  * @param   *block     The ir block the node belongs to.
1298  * @param   *store     The memory in which the object the entity should be
1299  *                     selected from is allocated.
1300  * @param   *objptr    The object from that the Sel operation selects a
1301  *                     single attribute out.
1302  * @param   *ent       The entity to select.
1303  */
1304 ir_node *new_rd_simpleSel (dbg_info *db, ir_graph *irg, ir_node *block,
1305                   ir_node *store, ir_node *objptr, entity *ent);
1306
1307 /** Constructor for a Sel node.
1308  *
1309  * The select node selects an entity (field or method) from an entity
1310  * with a compound type.  It explicitly specifies the entity selected.
1311  * Dynamically the node may select entities that overwrite the given
1312  * entity.  If the selected entity is an array element entity the Sel
1313  * node takes the required array indices as inputs.
1314  *
1315  * @param   *db        A pointer for debug information.
1316  * @param   *irg       The ir graph the node  belongs to.
1317  * @param   *block     The ir block the node belongs to.
1318  * @param   *store     The memory in which the object the entity should be selected
1319  *                     from is allocated.
1320  * @param   *objptr    A pointer to a compound entity the Sel operation selects a
1321  *                     single attribute from.
1322  * @param   *n_index   The number of array indices needed to select an array element entity.
1323  * @param   *index[]   If the compound entity is an array the indices of the selected
1324  *                     element entity.  The constructor copies this array.
1325  * @param   *ent       The entity to select.
1326  */
1327 ir_node *new_rd_Sel    (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
1328                         ir_node *objptr, int n_index, ir_node *index[], entity *ent);
1329
1330 /** Constructor for a Call node.
1331  *
1332  *  Represents all kinds of method and function calls.
1333  *
1334  * @param   *db     A pointer for debug information.
1335  * @param   *irg    The ir graph the node  belongs to.
1336  * @param   *block  The ir block the node belongs to.
1337  * @param   *store  The current memory state.
1338  * @param   *callee A pointer to the called procedure.
1339  * @param   arity   The number of procedure parameters.
1340  * @param   *in[]   An array with the procedure parameters. The constructor copies this array.
1341  * @param   *tp     Type information of the procedure called.
1342  */
1343 ir_node *new_rd_Call   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
1344                         ir_node *callee, int arity, ir_node *in[], ir_type *tp);
1345
1346 /** Constructor for a Add node.
1347  *
1348  * @param   *db    A pointer for debug information.
1349  * @param   *irg   The ir graph the node  belongs to.
1350  * @param   *block The ir block the node belongs to.
1351  * @param   *op1   The first operand.
1352  * @param   *op2   The second operand.
1353  * @param   *mode  The mode of the operands and the result.
1354  */
1355 ir_node *new_rd_Add    (dbg_info *db, ir_graph *irg, ir_node *block,
1356                         ir_node *op1, ir_node *op2, ir_mode *mode);
1357
1358 /** Constructor for a Sub node.
1359  *
1360  * @param   *db    A pointer for debug information.
1361  * @param   *irg   The ir graph the node  belongs to.
1362  * @param   *block The ir block the node belongs to.
1363  * @param   *op1   The first operand.
1364  * @param   *op2   The second operand.
1365  * @param   *mode  The mode of the operands and the result.
1366  */
1367 ir_node *new_rd_Sub    (dbg_info *db, ir_graph *irg, ir_node *block,
1368                         ir_node *op1, ir_node *op2, ir_mode *mode);
1369
1370 /** Constructor for a Minus node.
1371  *
1372  * @param   *db    A pointer for debug information.
1373  * @param   *irg   The ir graph the node  belongs to.
1374  * @param   *block The ir block the node belongs to.
1375  * @param   *op    The operand .
1376  * @param   *mode  The mode of the operand and the result.
1377  */
1378 ir_node *new_rd_Minus  (dbg_info *db, ir_graph *irg, ir_node *block,
1379                         ir_node *op,  ir_mode *mode);
1380
1381 /** Constructor for a Mul node.
1382  *
1383  * @param   *db    A pointer for debug information.
1384  * @param   *irg   The ir graph the node  belongs to.
1385  * @param   *block The ir block the node belongs to.
1386  * @param   *op1   The first operand.
1387  * @param   *op2   The second operand.
1388  * @param   *mode  The mode of the operands and the result.
1389  */
1390 ir_node *new_rd_Mul    (dbg_info *db, ir_graph *irg, ir_node *block,
1391                ir_node *op1, ir_node *op2, ir_mode *mode);
1392
1393 /** Constructor for a Quot node.
1394  *
1395  * @param   *db    A pointer for debug information.
1396  * @param   *irg   The ir graph the node  belongs to.
1397  * @param   *block The ir block the node belongs to.
1398  * @param   *memop The store needed to model exceptions
1399  * @param   *op1   The first operand.
1400  * @param   *op2   The second operand.
1401  */
1402 ir_node *new_rd_Quot   (dbg_info *db, ir_graph *irg, ir_node *block,
1403                ir_node *memop, ir_node *op1, ir_node *op2);
1404
1405 /** Constructor for a DivMod node.
1406  *
1407  * @param   *db    A pointer for debug information.
1408  * @param   *irg   The ir graph the node  belongs to.
1409  * @param   *block The ir block the node belongs to.
1410  * @param   *memop The store needed to model exceptions
1411  * @param   *op1   The first operand.
1412  * @param   *op2   The second operand.
1413  */
1414 ir_node *new_rd_DivMod (dbg_info *db, ir_graph *irg, ir_node *block,
1415                ir_node *memop, ir_node *op1, ir_node *op2);
1416
1417 /** Constructor for a Div node.
1418  *
1419  * @param   *db    A pointer for debug information.
1420  * @param   *irg   The ir graph the node  belongs to.
1421  * @param   *block The ir block the node belongs to.
1422  * @param   *memop The store needed to model exceptions
1423  * @param   *op1   The first operand.
1424  * @param   *op2   The second operand.
1425  */
1426 ir_node *new_rd_Div    (dbg_info *db, ir_graph *irg, ir_node *block,
1427                ir_node *memop, ir_node *op1, ir_node *op2);
1428
1429 /** Constructor for a Mod node.
1430  *
1431  * @param   *db    A pointer for debug information.
1432  * @param   *irg   The ir graph the node  belongs to.
1433  * @param   *block The ir block the node belongs to.
1434  * @param   *memop The store needed to model exceptions
1435  * @param   *op1   The first operand.
1436  * @param   *op2   The second operand.
1437  */
1438 ir_node *new_rd_Mod    (dbg_info *db, ir_graph *irg, ir_node *block,
1439                         ir_node *memop, ir_node *op1, ir_node *op2);
1440
1441 /** Constructor for a Abs node.
1442  *
1443  * @param   *db    A pointer for debug information.
1444  * @param   *irg   The ir graph the node  belongs to.
1445  * @param   *block The ir block the node belongs to.
1446  * @param   *op    The operand
1447  * @param   *mode  The mode of the operands and the result.
1448  */
1449 ir_node *new_rd_Abs    (dbg_info *db, ir_graph *irg, ir_node *block,
1450                        ir_node *op, ir_mode *mode);
1451
1452 /** Constructor for a And node.
1453  *
1454  * @param   *db    A pointer for debug information.
1455  * @param   *irg   The ir graph the node  belongs to.
1456  * @param   *block The ir block the node belongs to.
1457  * @param   *op1   The first operand.
1458  * @param   *op2   The second operand.
1459  * @param   *mode  The mode of the operands and the result.
1460  */
1461 ir_node *new_rd_And    (dbg_info *db, ir_graph *irg, ir_node *block,
1462                         ir_node *op1, ir_node *op2, ir_mode *mode);
1463
1464 /** Constructor for a Or node.
1465  *
1466  * @param   *db    A pointer for debug information.
1467  * @param   *irg   The ir graph the node  belongs to.
1468  * @param   *block The ir block the node belongs to.
1469  * @param   *op1   The first operand.
1470  * @param   *op2   The second operand.
1471  * @param   *mode  The mode of the operands and the result.
1472  */
1473 ir_node *new_rd_Or     (dbg_info *db, ir_graph *irg, ir_node *block,
1474                         ir_node *op1, ir_node *op2, ir_mode *mode);
1475
1476 /** Constructor for a Eor node.
1477  *
1478  * @param   *db    A pointer for debug information.
1479  * @param   *irg   The ir graph the node  belongs to.
1480  * @param   *block The ir block the node belongs to.
1481  * @param   *op1   The first operand.
1482  * @param   *op2   The second operand.
1483  * @param   *mode  The mode of the operands and the results.
1484  */
1485 ir_node *new_rd_Eor    (dbg_info *db, ir_graph *irg, ir_node *block,
1486                         ir_node *op1, ir_node *op2, ir_mode *mode);
1487
1488 /** Constructor for a Not node.
1489  *
1490  * @param   *db    A pointer for debug information.
1491  * @param   *irg   The ir graph the node  belongs to.
1492  * @param   *block The ir block the node belongs to.
1493  * @param   *op    The operand.
1494  * @param   *mode  The mode of the operand and the result.
1495  */
1496 ir_node *new_rd_Not    (dbg_info *db, ir_graph *irg, ir_node *block,
1497                ir_node *op, ir_mode *mode);
1498
1499 /** Constructor for a Cmp node.
1500  *
1501  * @param   *db    A pointer for debug information.
1502  * @param   *irg   The ir graph the node  belongs to.
1503  * @param   *block The ir block the node belongs to.
1504  * @param   *op1   The first operand.
1505  * @param   *op2   The second operand.
1506  */
1507 ir_node *new_rd_Cmp    (dbg_info *db, ir_graph *irg, ir_node *block,
1508                ir_node *op1, ir_node *op2);
1509
1510 /** Constructor for a Shl node.
1511  *
1512  * @param   *db    A pointer for debug information.
1513  * @param   *irg   The ir graph the node  belongs to.
1514  * @param   *block The ir block the node belongs to.
1515  * @param   *op    The operand.
1516  * @param   *k     The number of bits to  shift the operand .
1517  * @param   *mode  The mode of the operand and the result.
1518  */
1519 ir_node *new_rd_Shl    (dbg_info *db, ir_graph *irg, ir_node *block,
1520                ir_node *op, ir_node *k, ir_mode *mode);
1521
1522 /** Constructor for a Shr node.
1523  *
1524  * @param   *db    A pointer for debug information.
1525  * @param   *irg   The ir graph the node  belongs to.
1526  * @param   *block The ir block the node belongs to.
1527  * @param   *op    The operand.
1528  * @param   *k     The number of bits to shift the operand .
1529  * @param   *mode  The mode of the operand and the result.
1530  */
1531 ir_node *new_rd_Shr    (dbg_info *db, ir_graph *irg, ir_node *block,
1532                ir_node *op, ir_node *k, ir_mode *mode);
1533
1534 /** Constructor for a Shrs node.
1535  *
1536  * @param   *db    A pointer for debug information.
1537  * @param   *irg   The ir graph the node  belongs to.
1538  * @param   *block The ir block the node belongs to.
1539  * @param   *op    The operand.
1540  * @param   *k     The number of bits to shift the operand.
1541  * @param   *mode  The mode of the operand and the result.
1542  */
1543 ir_node *new_rd_Shrs   (dbg_info *db, ir_graph *irg, ir_node *block,
1544                ir_node *op, ir_node *k, ir_mode *mode);
1545
1546 /** Constructor for a Rot node.
1547  *
1548  * @param   *db    A pointer for debug information.
1549  * @param   *irg   The ir graph the node  belongs to.
1550  * @param   *block The ir block the node belongs to.
1551  * @param   *op    The operand.
1552  * @param   *k     The number of bits to rotate the operand.
1553  * @param   *mode  The mode of the operand.
1554  */
1555 ir_node *new_rd_Rot    (dbg_info *db, ir_graph *irg, ir_node *block,
1556                ir_node *op, ir_node *k, ir_mode *mode);
1557
1558
1559 /** Constructor for a Conv node.
1560  *
1561  * @param   *db    A pointer for debug information.
1562  * @param   *irg   The ir graph the node  belongs to.
1563  * @param   *block The ir block the node belongs to.
1564  * @param   *op    The operand.
1565  * @param   *mode  The mode of this the operand muss be converted .
1566  */
1567 ir_node *new_rd_Conv   (dbg_info *db, ir_graph *irg, ir_node *block,
1568                ir_node *op, ir_mode *mode);
1569
1570 /** Constructor for a Cast node.
1571  *
1572  * High level type cast.
1573  *
1574  * @param   *db    A pointer for debug information.
1575  * @param   *irg   The ir graph the node  belongs to.
1576  * @param   *block The ir block the node belongs to.
1577  * @param   *op    The operand.
1578  * @param   *to_tp The type of this the operand muss be casted .
1579  */
1580 ir_node *new_rd_Cast   (dbg_info *db, ir_graph *irg, ir_node *block,
1581                         ir_node *op, ir_type *to_tp);
1582
1583 /** Constructor for a Carry node.
1584  *
1585  * @param   *db    A pointer for debug information.
1586  * @param   *irg   The ir graph the node  belongs to.
1587  * @param   *block The ir block the node belongs to.
1588  * @param   *op1   The first operand.
1589  * @param   *op2   The second operand.
1590  * @param   *mode  The mode of the operands and the result.
1591  */
1592 ir_node *new_rd_Carry  (dbg_info *db, ir_graph *irg, ir_node *block,
1593                         ir_node *op1, ir_node *op2, ir_mode *mode);
1594
1595 /** Constructor for a Borrow node.
1596  *
1597  * @param   *db    A pointer for debug information.
1598  * @param   *irg   The ir graph the node  belongs to.
1599  * @param   *block The ir block the node belongs to.
1600  * @param   *op1   The first operand.
1601  * @param   *op2   The second operand.
1602  * @param   *mode  The mode of the operands and the result.
1603  */
1604 ir_node *new_rd_Borrow (dbg_info *db, ir_graph *irg, ir_node *block,
1605                         ir_node *op1, ir_node *op2, ir_mode *mode);
1606
1607 /** Constructor for a Phi node.
1608  *
1609  * @param *db    A pointer for debug information.
1610  * @param *irg   The ir graph the node  belongs to.
1611  * @param *block The ir block the node belongs to.
1612  * @param arity  The number of predecessors
1613  * @param *in[]  Array with predecessors.  The constructor copies this array.
1614  * @param *mode  The mode of it's inputs and output.
1615  */
1616 ir_node *new_rd_Phi    (dbg_info *db, ir_graph *irg, ir_node *block, int arity,
1617                         ir_node *in[], ir_mode *mode);
1618
1619 /** Constructor for a Load node.
1620  *
1621  * @param *db    A pointer for debug information.
1622  * @param *irg   The ir graph the node  belongs to.
1623  * @param *block The ir block the node belongs to.
1624  * @param *store The current memory
1625  * @param *adr   A pointer to the variable to be read in this memory.
1626  * @param *mode  The mode of the value to be loaded.
1627  */
1628 ir_node *new_rd_Load   (dbg_info *db, ir_graph *irg, ir_node *block,
1629                         ir_node *store, ir_node *adr, ir_mode *mode);
1630
1631 /** Constructor for a Store node.
1632  *
1633  * @param *db    A pointer for debug information.
1634  * @param *irg   The ir graph the node  belongs to.
1635  * @param *block The ir block the node belongs to.
1636  * @param *store The current memory
1637  * @param *adr   A pointer to the variable to be read in this memory.
1638  * @param *val   The value to write to this variable.
1639  */
1640 ir_node *new_rd_Store  (dbg_info *db, ir_graph *irg, ir_node *block,
1641                ir_node *store, ir_node *adr, ir_node *val);
1642
1643 /** Constructor for a Alloc node.
1644  *
1645  * The Alloc node extends the memory by space for an entity of type alloc_type.
1646  *
1647  * @param *db         A pointer for debug information.
1648  * @param *irg        The ir graph the node  belongs to.
1649  * @param *block      The ir block the node belongs to.
1650  * @param *store      The memory which shall contain the new variable.
1651  * @param *size       The number of bytes to allocate.
1652  * @param *alloc_type The type of the allocated variable.
1653  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
1654  */
1655 ir_node *new_rd_Alloc  (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
1656                ir_node *size, ir_type *alloc_type, where_alloc where);
1657
1658 /** Constructor for a Free node.
1659  *
1660  * Frees the memory occupied by the entity pointed to by the pointer
1661  * arg.  Type indicates the type of the entity the argument points to.
1662  *
1663  * @param *db         A pointer for debug information.
1664  * @param *irg        The ir graph the node  belongs to.
1665  * @param *block      The ir block the node belongs to.
1666  * @param *store      The memory which shall contain the new variable.
1667  * @param *ptr        The pointer to the object to free.
1668  * @param *size       The number of objects of type free_type to free in a sequence.
1669  * @param *free_type  The type of the freed variable.
1670  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
1671  */
1672 ir_node *new_rd_Free   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
1673                         ir_node *ptr, ir_node *size, ir_type *free_type, where_alloc where);
1674
1675 /** Constructor for a Sync node.
1676  *
1677  * Merges several memory values.  The node assumes that a variable
1678  * either occurs only in one of the memories, or it contains the same
1679  * value in all memories where it occurs.
1680  *
1681  * @param *db       A pointer for debug information.
1682  * @param *irg      The ir graph the node  belongs to.
1683  * @param *block    The ir block the node belongs to.
1684  * @param  arity    The number of memories to synchronize.
1685  * @param  *in[]    An array of pointers to nodes that produce an output of type
1686  *                  memory.  The constructor copies this array.
1687  */
1688 ir_node *new_rd_Sync   (dbg_info *db, ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
1689
1690 /** Constructor for a Proj node.
1691  *
1692  * Projects a single value out of a tuple.  The parameter proj gives the
1693  * position of the value within the tuple.
1694  *
1695  * @param *db    A pointer for debug information.
1696  * @param *irg   The ir graph the node  belongs to.
1697  * @param *block The ir block the node belongs to.
1698  * @param arg    A node producing a tuple.  The node must have mode_T.
1699  * @param *mode  The mode of the value to project.
1700  * @param proj   The position of the value in the tuple.
1701  */
1702 ir_node *new_rd_Proj   (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
1703                         ir_mode *mode, long proj);
1704
1705 /** Constructor for a defaultProj node.
1706  *
1707  * Represents the default control flow of a Switch-Cond node.
1708  *
1709  * @param *db       A pointer for debug information.
1710  * @param *irg      The ir graph the node  belongs to.
1711  * @param *block    The ir block the node belongs to.
1712  * @param arg       A node producing a tuple.
1713  * @param max_proj  The end position of the value in the tuple.
1714  */
1715 ir_node *new_rd_defaultProj (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
1716                              long max_proj);
1717
1718 /** Constructor for a Tuple node.
1719  *
1720  * This is an auxiliary node to replace a node that returns a tuple
1721  * without changing the corresponding Proj nodes.
1722  *
1723  * @param *db     A pointer for debug information.
1724  * @param *irg    The ir graph the node  belongs to.
1725  * @param *block  The ir block the node belongs to.
1726  * @param arity   The number of tuple elements.
1727  * @param *in[]   An array containing pointers to the nodes producing the tuple
1728  *                elements. The constructor copies this array.
1729  */
1730 ir_node *new_rd_Tuple  (dbg_info *db, ir_graph *irg, ir_node *block,
1731                         int arity, ir_node *in[]);
1732
1733 /** Constructor for a Id node.
1734  *
1735  * This is an auxiliary node to replace a node that returns a single
1736  * value.
1737  *
1738  * @param *db     A pointer for debug information.
1739  * @param *irg    The ir graph the node  belongs to.
1740  * @param *block  The ir block the node belongs to.
1741  * @param *val    The value
1742  * @param *mode   The mode of *val.
1743  */
1744 ir_node *new_rd_Id     (dbg_info *db, ir_graph *irg, ir_node *block,
1745                         ir_node *val, ir_mode *mode);
1746
1747 /** Constructor for a Bad node.
1748  *
1749  * Returns the unique Bad node of the graph.  The same as
1750  * get_irg_bad().
1751  *
1752  * @param *irg    The ir graph the node belongs to.
1753  */
1754 ir_node *new_rd_Bad    (ir_graph *irg);
1755
1756 /** Constructor for a Confirm node.
1757  *
1758  * Specifies constraints for a value.  To support dataflow analyses.
1759  *
1760  * Example: If the value never exceeds '100' this is expressed by placing a
1761  * Confirm node val = new_d_Confirm(db, val, 100, '<') on the dataflow edge.
1762  *
1763  * @param *irg    The ir graph the node belong to.
1764  * @param *block  The ir block the node belong to.
1765  * @param *db     A pointer for debug information.
1766  * @param *val    The value we express a constraint for
1767  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
1768  * @param cmp     The compare operation.
1769  */
1770 ir_node *new_rd_Confirm (dbg_info *db, ir_graph *irg, ir_node *block,
1771              ir_node *val, ir_node *bound, pn_Cmp cmp);
1772
1773 /** Constructor for an Unknown node.
1774  *
1775  * Represents an arbitrary value.  Places the node in the start block.
1776  *
1777  * @param *irg    The ir graph the node  belongs to.
1778  * @param *m      The mode of the unknown value.
1779  */
1780 ir_node *new_rd_Unknown(ir_graph *irg, ir_mode *m);
1781
1782 /** Constructor for a CallBegin node.
1783  *
1784  * CallBegin represents control flow depending of the pointer value
1785  * representing the called method to the called methods.  The
1786  * constructor copies the method pointer input from the passed Call
1787  * node.
1788  *
1789  * @param *db     A pointer for debug information.
1790  * @param *irg    The ir graph the node belong to.
1791  * @param *block  The block the node belong to.
1792  * @param *callee The call node visible in the intra procedural view.
1793  */
1794 ir_node *new_rd_CallBegin(dbg_info *db, ir_graph *irg, ir_node *block, ir_node *callee);
1795
1796 /** Constructor for a EndReg node.
1797  *
1798  * Used to represent regular procedure end in interprocedual view.
1799  *
1800  * @param *db     A pointer for debug information.
1801  * @param *irg    The ir graph the node belong to.
1802  * @param *block  The block the node belong to.
1803  */
1804 ir_node *new_rd_EndReg (dbg_info *db, ir_graph *irg, ir_node *block);
1805
1806 /** Constructor for a EndExcept node.
1807  *
1808  * Used to represent exceptional procedure end in interprocedural view.
1809  *
1810  * @param *db     A pointer for debug information.
1811  * @param *irg    The ir graph the node belong to.
1812  * @param *block  The block the node belong to.
1813  */
1814 ir_node *new_rd_EndExcept(dbg_info *db, ir_graph *irg, ir_node *block);
1815
1816 /** Constructor for a Filter node.
1817  *
1818  * Adds the node to the block in current_ir_block.  Filter is a node
1819  * with two views used to construct the interprocedural view.  In
1820  * intraprocedural view its semantics are identical to the Proj node.
1821  * In interprocedural view the Filter performs the Phi operation on
1822  * method parameters or results.  Other than a Phi a Filter node may
1823  * not be removed if it has only a single input.
1824  *
1825  * The constructor builds the Filter in intraprocedural view.
1826  *
1827  * @param *db     A pointer for debug information.
1828  * @param *irg    The ir graph the node belong to.
1829  * @param *block  The block the node belong to.
1830  * @param *arg  The tuple value to project from.
1831  * @param *mode The mode of the projected value.
1832  * @param proj  The position in the tuple to project from.
1833  */
1834 ir_node *new_rd_Filter (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *arg,
1835                         ir_mode *mode, long proj);
1836
1837 /** Constructor for a NoMem node.
1838  *
1839  * Returns the unique NoMem node of the graph.  The same as
1840  * get_irg_no_mem().
1841  *
1842  * @param *irg    The ir graph the node belongs to.
1843  */
1844 ir_node *new_rd_NoMem  (ir_graph *irg);
1845
1846 /** Constructor for a Mux node.
1847  *
1848  * @param *db       A pointer for debug information.
1849  * @param *irg      The ir graph the node belong to.
1850  * @param *block    The block the node belong to.
1851  * @param *sel      The ir_node that calculates the boolean select.
1852  * @param *ir_true  The ir_node that calculates the true result.
1853  * @param *ir_false The ir_node that calculates the false result.
1854  * @param *mode     The mode of the node (and it_true and ir_false).
1855  */
1856 ir_node *new_rd_Mux  (dbg_info *db, ir_graph *irg, ir_node *block,
1857     ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
1858
1859 /** Constructor for a CopyB node.
1860  *
1861  * @param *db         A pointer for debug information.
1862  * @param *irg        The ir graph the node belong to.
1863  * @param *block      The block the node belong to.
1864  * @param *store      The current memory
1865  * @param *dst        The ir_node that represents the destination address.
1866  * @param *src        The ir_node that represents the source address.
1867  * @param *data_type  The type of the copied data
1868  */
1869 ir_node *new_rd_CopyB(dbg_info *db, ir_graph *irg, ir_node *block,
1870     ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
1871
1872 /** Constructor for a InstOf node.
1873  *
1874  * A High-Level Type check.
1875  *
1876  * @param   *db        A pointer for debug information.
1877  * @param   *irg       The ir graph the node  belongs to.
1878  * @param   *block     The ir block the node belongs to.
1879  * @param   *store     The memory in which the object the entity should be selected
1880  *                     from is allocated.
1881  * @param   *objptr    A pointer to a object of a class type.
1882  * @param   *type      The type of which objptr must be.
1883  */
1884 ir_node *new_rd_InstOf (dbg_info *db, ir_graph *irg, ir_node *block, ir_node *store,
1885                         ir_node *objptr, ir_type *type);
1886
1887 /** Constructor for a Raise node.
1888  *
1889  * A High-Level Exception throw.
1890  *
1891  * @param *db    A pointer for debug information.
1892  * @param *irg   The ir graph the node  belongs to.
1893  * @param *block The ir block the node belongs to.
1894  * @param *store The current memory.
1895  * @param *obj   A pointer to the Except variable.
1896  */
1897 ir_node *new_rd_Raise  (dbg_info *db, ir_graph *irg, ir_node *block,
1898                         ir_node *store, ir_node *obj);
1899
1900 /** Constructor for a Bound node.
1901  *
1902  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
1903  *
1904  * @param *db         A pointer for debug information.
1905  * @param *irg        The ir graph the node belong to.
1906  * @param *block      The block the node belong to.
1907  * @param *store      The current memory
1908  * @param *idx        The ir_node that represents an index.
1909  * @param *lower      The ir_node that represents the lower bound for the index.
1910  * @param *upper      The ir_node that represents the upper bound for the index.
1911  */
1912 ir_node *new_rd_Bound(dbg_info *db, ir_graph *irg, ir_node *block,
1913     ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
1914
1915 /*-------------------------------------------------------------------------*/
1916 /* The raw interface without debug support                                 */
1917 /*-------------------------------------------------------------------------*/
1918
1919 /** Constructor for a Block node.
1920  *
1921  * Constructs a mature block with the given predecessors.  Use Unknown
1922  * nodes as predecessors to construct a block if the number of
1923  * predecessors is known, but not the predecessors themselves.  This
1924  * constructor does not set current_block.  It not be used with
1925  * automatic Phi node construction.
1926  *
1927  *
1928  * @param irg    The ir graph the block belongs to.
1929  * @param arity  The number of control predecessors.
1930  * @param in[]   An array of control predecessors.  The length of
1931  *               the array must be 'arity'. The constructor copies this array.
1932  */
1933 ir_node *new_r_Block  (ir_graph *irg,  int arity, ir_node *in[]);
1934
1935 /** Constructor for a Start node.
1936  *
1937  * @param *irg   The ir graph the node belongs to.
1938  * @param *block The ir block the node belongs to.
1939  */
1940 ir_node *new_r_Start  (ir_graph *irg, ir_node *block);
1941
1942 /** Constructor for a End node.
1943  *
1944  * @param *irg   The ir graph the node  belongs to.
1945  * @param *block The ir block the node belongs to.
1946  */
1947 ir_node *new_r_End    (ir_graph *irg, ir_node *block);
1948
1949 /** Constructor for a Jmp node.
1950  *
1951  * Jmp represents control flow to a single control successor.
1952  *
1953  * @param *irg    The ir graph the node belongs to.
1954  * @param *block  The ir block the node belongs to.
1955  */
1956 ir_node *new_r_Jmp    (ir_graph *irg, ir_node *block);
1957
1958 /** Constructor for an IJmp node.
1959  *
1960  * IJmp represents control flow to a single control successor not
1961  * statically known i.e. an indirect Jmp.
1962  *
1963  * @param *irg    The ir graph the node belongs to.
1964  * @param *block  The ir block the node belongs to.
1965  * @param *tgt    The ir node representing the target address.
1966  */
1967 ir_node *new_r_IJmp   (ir_graph *irg, ir_node *block, ir_node *tgt);
1968
1969 /** Constructor for a Cond node.
1970  *
1971  * If c is mode_b represents a conditional branch (if/else). If c is
1972  * mode_Is/mode_Iu (?) represents a switch.  (Allocates dense Cond
1973  * node, default Proj is 0.)
1974  *
1975  * This is not consistent:  Input to Cond is Is, Proj has as proj number
1976  * longs.
1977  *
1978  * @param *irg   The ir graph the node  belongs to.
1979  * @param *block The ir block the node belongs to.
1980  * @param *c     The conditions parameter.Can be of mode b or I_u.
1981  */
1982 ir_node *new_r_Cond   (ir_graph *irg, ir_node *block, ir_node *c);
1983
1984 /** Constructor for a Return node.
1985  *
1986  * Returns the memory an zero or more return values.  Only node that
1987  * can end regular control flow.
1988  *
1989  * @param *irg   The ir graph the node  belongs to.
1990  * @param *block The ir block the node belongs to.
1991  * @param *store The state of memory.
1992  * @param arity  Number of array indices.
1993  * @param *in[]   Array with index inputs to the node. The constructor copies this array.
1994  */
1995 ir_node *new_r_Return (ir_graph *irg, ir_node *block,
1996                        ir_node *store, int arity, ir_node *in[]);
1997
1998 /** Constructor for a Const node.
1999  *
2000  * Constructor for a Const node. The constant represents a target
2001  * value.  Sets the type information to type_unknown.  (No more
2002  * supported: If tv is entity derives a somehow useful type.)
2003  *
2004  * @param *irg   The ir graph the node  belongs to.
2005  * @param *block The ir block the node belongs to.
2006  * @param *mode  The mode of the operands and the results.
2007  * @param *con   Points to an entry in the constant table.
2008  */
2009 ir_node *new_r_Const  (ir_graph *irg, ir_node *block,
2010                        ir_mode *mode, tarval *con);
2011
2012 /** Constructor for a Const node.
2013  *
2014  * Constructor for a Const node. The constant represents a target
2015  * value.  Sets the type information to type_unknown.  (No more
2016  * supported: If tv is entity derives a somehow useful type.)
2017  *
2018  * @param *irg   The ir graph the node  belongs to.
2019  * @param *block The ir block the node belongs to.
2020  * @param *mode  The mode of the operands and the results.
2021  * @param value  A value from which the tarval is made.
2022  */
2023 ir_node *new_r_Const_long(ir_graph *irg, ir_node *block,
2024                        ir_mode *mode, long value);
2025
2026 /** Constructor for a Const_type node.
2027  *
2028  * The constant represents a target value.  This constructor sets high
2029  * level type information for the constant value.
2030  *
2031  * @param *irg   The ir graph the node  belongs to.
2032  * @param *block The ir block the node belongs to.
2033  * @param *mode  The mode of the operands and results.
2034  * @param *con   Points to an entry in the constant table.
2035  * @param *tp    The type of the constant.
2036  */
2037 ir_node *new_r_Const_type(ir_graph *irg, ir_node *block,
2038            ir_mode *mode, tarval *con, ir_type *tp);
2039
2040 /** Constructor for a SymConst node.
2041  *
2042  *  This is the constructor for a symbolic constant.
2043  *    There are four kinds of symbolic constants:
2044  *    - type_tag  The symbolic constant represents a type tag.  The type the
2045  *                tag stands for is given explicitly.
2046  *    - size      The symbolic constant represents the size of a type.  The
2047  *                type of which the constant represents the size is given
2048  *                explicitly.
2049  *    - addr_name The symbolic constant represents the address of an entity
2050  *                (variable or method).  The variable is indicated by a name
2051  *                that is valid for linking.
2052  *    - addr_ent   The symbolic constant represents the address of an entity
2053  *                (variable or method).  The variable is given explicitly by
2054  *                a firm entity.
2055  *
2056  *    Inputs to the node:
2057  *      No inputs except the block it belongs to.
2058  *    Outputs of the node.
2059  *      An unsigned integer (I_u) or a pointer (P).
2060  *
2061  * @param *irg    The ir graph the node  belongs to.
2062  * @param *block  The ir block the node belongs to.
2063  * @param value   A type, entity or a ident depending on the SymConst kind.
2064  * @param symkind The kind of the symbolic constant: type_tag, size or link_info.
2065  */
2066 ir_node *new_r_SymConst (ir_graph *irg, ir_node *block,
2067                          union symconst_symbol value, symconst_kind symkind);
2068
2069 /** Constructor for a simpleSel node.
2070  *
2071  *  This is a shortcut for the new_d_Sel() constructor.  To be used for
2072  *  Sel nodes that do not select from an array, i.e., have no index
2073  *  inputs.  It adds the two parameters 0, NULL.
2074  *
2075  * @param   *irg       The ir graph the node  belongs to.
2076  * @param   *block     The ir block the node belongs to.
2077  * @param   *store     The memory in which the object the entity should be selected
2078  *                     from is allocated.
2079  * @param   *objptr    The object from that the Sel operation selects a
2080  *                     single attribute out.
2081  * @param   *ent       The entity to select.
2082  */
2083 ir_node *new_r_simpleSel(ir_graph *irg, ir_node *block, ir_node *store,
2084                          ir_node *objptr, entity *ent);
2085
2086 /** Constructor for a Sel node.
2087  *
2088  * The select node selects an entity (field or method) from an entity
2089  * with a compound type.  It explicitly specifies the entity selected.
2090  * Dynamically the node may select entities that overwrite the given
2091  * entity.  If the selected entity is an array element entity the Sel
2092  * node takes the required array indices as inputs.
2093  *
2094  * @param   *irg       The ir graph the node  belongs to.
2095  * @param   *block     The ir block the node belongs to.
2096  * @param   *store     The memory in which the object the entity should be selected
2097  *                     from is allocated.
2098  * @param   *objptr    A pointer to a compound entity the Sel operation selects a
2099  *                     single attribute from.
2100  * @param   *n_index   The number of array indices needed to select an array element entity.
2101  * @param   *index[]   If the compound entity is an array the indices of the selected
2102  *                     element entity.  The constructor copies this array.
2103  * @param   *ent       The entity to select.
2104  */
2105 ir_node *new_r_Sel    (ir_graph *irg, ir_node *block, ir_node *store,
2106                        ir_node *objptr, int n_index, ir_node *index[],
2107                entity *ent);
2108
2109 /** Constructor for a Call node.
2110  *
2111  *  Represents all kinds of method and function calls.
2112  *
2113  * @param   *irg    The ir graph the node  belongs to.
2114  * @param   *block  The ir block the node belongs to.
2115  * @param   *store  The actual store.
2116  * @param   *callee A pointer to the called procedure.
2117  * @param   arity   The number of procedure parameters.
2118  * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
2119  * @param   *tp     Type information of the procedure called.
2120  */
2121 ir_node *new_r_Call   (ir_graph *irg, ir_node *block, ir_node *store,
2122                ir_node *callee, int arity, ir_node *in[],
2123                ir_type *tp);
2124
2125 /** Constructor for a Add node.
2126  *
2127  * @param   *irg   The ir graph the node  belongs to.
2128  * @param   *block The ir block the node belongs to.
2129  * @param   *op1   The first operand.
2130  * @param   *op2   The second operand.
2131  * @param   *mode  The mode of the operands and the result.
2132  */
2133 ir_node *new_r_Add    (ir_graph *irg, ir_node *block,
2134                ir_node *op1, ir_node *op2, ir_mode *mode);
2135
2136 /**
2137  * Constructor for a Sub node.
2138  *
2139  * @param   *irg   The ir graph the node  belongs to.
2140  * @param   *block The ir block the node belongs to.
2141  * @param   *op1   The first operand.
2142  * @param   *op2   The second operand.
2143  * @param   *mode  The mode of the operands and the results.
2144  */
2145 ir_node *new_r_Sub    (ir_graph *irg, ir_node *block,
2146                ir_node *op1, ir_node *op2, ir_mode *mode);
2147
2148 /** Constructor for a Minus node.
2149  *
2150  * @param   *irg   The ir graph the node  belongs to.
2151  * @param   *block The ir block the node belongs to.
2152  * @param   *op   The operand.
2153  * @param   *mode  The mode of the operand and the result.
2154  */
2155 ir_node *new_r_Minus  (ir_graph *irg, ir_node *block,
2156                ir_node *op,  ir_mode *mode);
2157 /** Constructor for a Mul node.
2158  *
2159  * @param   *irg   The ir graph the node  belongs to.
2160  * @param   *block The ir block the node belongs to.
2161  * @param   *op1   The first operand.
2162  * @param   *op2   The second operand.
2163  * @param   *mode  The mode of the operands and the result.
2164  */
2165 ir_node *new_r_Mul    (ir_graph *irg, ir_node *block,
2166                ir_node *op1, ir_node *op2, ir_mode *mode);
2167
2168 /** Constructor for a Quot node.
2169  *
2170  * @param   *irg   The ir graph the node  belongs to.
2171  * @param   *block The ir block the node belongs to.
2172  * @param   *memop The store needed to model exceptions
2173  * @param   *op1   The first operand.
2174  * @param   *op2   The second operand.
2175  */
2176 ir_node *new_r_Quot   (ir_graph *irg, ir_node *block,
2177                ir_node *memop, ir_node *op1, ir_node *op2);
2178
2179 /** Constructor for a DivMod node.
2180  *
2181  * @param   *irg   The ir graph the node  belongs to.
2182  * @param   *block The ir block the node belongs to.
2183  * @param   *memop The store needed to model exceptions
2184  * @param   *op1   The first operand.
2185  * @param   *op2   The second operand.
2186  */
2187 ir_node *new_r_DivMod (ir_graph *irg, ir_node *block,
2188                ir_node *memop, ir_node *op1, ir_node *op2);
2189
2190 /** Constructor for a Div node.
2191  *
2192  * @param   *irg   The ir graph the node  belongs to.
2193  * @param   *block The ir block the node belongs to.
2194  * @param   *memop The store needed to model exceptions
2195  * @param   *op1   The first operand.
2196  * @param   *op2   The second operand.
2197  */
2198 ir_node *new_r_Div    (ir_graph *irg, ir_node *block,
2199                ir_node *memop, ir_node *op1, ir_node *op2);
2200
2201 /** Constructor for a Mod node.
2202  *
2203  * @param   *irg   The ir graph the node  belongs to.
2204  * @param   *block The ir block the node belongs to.
2205  * @param   *memop The store needed to model exceptions
2206  * @param   *op1   The first operand.
2207  * @param   *op2   The second operand.
2208  */
2209 ir_node *new_r_Mod    (ir_graph *irg, ir_node *block,
2210                ir_node *memop, ir_node *op1, ir_node *op2);
2211
2212 /** Constructor for a Abs node.
2213  *
2214  * @param   *irg   The ir graph the node  belongs to.
2215  * @param   *block The ir block the node belongs to.
2216  * @param   *op    The operand
2217  * @param   *mode  The mode of the operands and the result.
2218  */
2219 ir_node *new_r_Abs    (ir_graph *irg, ir_node *block,
2220                        ir_node *op, ir_mode *mode);
2221
2222 /** Constructor for a And node.
2223  *
2224  * @param   *irg   The ir graph the node  belongs to.
2225  * @param   *block The ir block the node belongs to.
2226  * @param   *op1   The first operand.
2227  * @param   *op2   The second operand.
2228  * @param   *mode  The mode of the operands and the result.
2229  */
2230 ir_node *new_r_And    (ir_graph *irg, ir_node *block,
2231                ir_node *op1, ir_node *op2, ir_mode *mode);
2232
2233 /** Constructor for a Or node.
2234  *
2235  * @param   *irg   The ir graph the node  belongs to.
2236  * @param   *block The ir block the node belongs to.
2237  * @param   *op1   The first operand.
2238  * @param   *op2   The second operand.
2239  * @param   *mode  The mode of the operands and the result.
2240  */
2241 ir_node *new_r_Or     (ir_graph *irg, ir_node *block,
2242                ir_node *op1, ir_node *op2, ir_mode *mode);
2243
2244 /** Constructor for a Eor node.
2245  *
2246  * @param   *irg   The ir graph the node  belongs to.
2247  * @param   *block The ir block the node belongs to.
2248  * @param   *op1   The first operand.
2249  * @param   *op2   The second operand.
2250  * @param   *mode  The mode of the operands and the results.
2251  */
2252 ir_node *new_r_Eor    (ir_graph *irg, ir_node *block,
2253                ir_node *op1, ir_node *op2, ir_mode *mode);
2254
2255 /** Constructor for a Not node.
2256  *
2257  * @param   *irg   The ir graph the node  belongs to.
2258  * @param   *block The ir block the node belongs to.
2259  * @param   *op    The operand.
2260  * @param   *mode  The mode of the operand and the result.
2261  */
2262 ir_node *new_r_Not    (ir_graph *irg, ir_node *block,
2263                ir_node *op, ir_mode *mode);
2264
2265 /** Constructor for a Cmp node.
2266  *
2267  * @param   *irg   The ir graph the node  belongs to.
2268  * @param   *block The ir block the node belongs to.
2269  * @param   *op1   The first operand.
2270  * @param   *op2   The second operand.
2271  */
2272 ir_node *new_r_Cmp    (ir_graph *irg, ir_node *block,
2273                ir_node *op1, ir_node *op2);
2274
2275 /** Constructor for a Shl node.
2276  *
2277  * @param   *irg   The ir graph the node  belongs to.
2278  * @param   *block The ir block the node belongs to.
2279  * @param   *op    The operand.
2280  * @param   *k     The number of bits to  shift the operand .
2281  * @param   *mode  The mode of the operand and the result.
2282  */
2283 ir_node *new_r_Shl    (ir_graph *irg, ir_node *block,
2284                ir_node *op, ir_node *k, ir_mode *mode);
2285
2286 /** Constructor for a Shr node.
2287  *
2288  * @param   *irg   The ir graph the node  belongs to.
2289  * @param   *block The ir block the node belongs to.
2290  * @param   *op    The operand.
2291  * @param   *k     The number of bits to shift the operand .
2292  * @param   *mode  The mode of the operand and the result.
2293  */
2294 ir_node *new_r_Shr    (ir_graph *irg, ir_node *block,
2295                ir_node *op, ir_node *k, ir_mode *mode);
2296
2297 /**
2298  * Constructor for a Shrs node.
2299  *
2300  * @param   *irg   The ir graph the node  belongs to.
2301  * @param   *block The ir block the node belongs to.
2302  * @param   *op    The operand.
2303  * @param   *k     The number of bits to shift the operand.
2304  * @param   *mode  The mode of the operand and the result.
2305  */
2306 ir_node *new_r_Shrs   (ir_graph *irg, ir_node *block,
2307                ir_node *op, ir_node *k, ir_mode *mode);
2308
2309 /** Constructor for a Rot node.
2310  *
2311  * @param   *irg   The ir graph the node  belongs to.
2312  * @param   *block The ir block the node belongs to.
2313  * @param   *op    The operand.
2314  * @param   *k     The number of bits to rotate the operand.
2315  * @param   *mode  The mode of the operand.
2316  */
2317 ir_node *new_r_Rot    (ir_graph *irg, ir_node *block,
2318                ir_node *op, ir_node *k, ir_mode *mode);
2319
2320 /** Constructor for a Conv node.
2321  *
2322  * @param   *irg   The ir graph the node  belongs to.
2323  * @param   *block The ir block the node belongs to.
2324  * @param   *op    The operand.
2325  * @param   *mode  The mode of this the operand muss be converted .
2326  */
2327 ir_node *new_r_Conv   (ir_graph *irg, ir_node *block,
2328                ir_node *op, ir_mode *mode);
2329
2330 /** Constructor for a Cast node.
2331  *
2332  * High level type cast
2333  *
2334  * @param   *irg   The ir graph the node  belongs to.
2335  * @param   *block The ir block the node belongs to.
2336  * @param   *op    The operand.
2337  * @param   *to_tp The type of this the operand muss be casted .
2338  */
2339 ir_node *new_r_Cast   (ir_graph *irg, ir_node *block,
2340                ir_node *op, ir_type *to_tp);
2341
2342 /** Constructor for a Carry node.
2343  *
2344  * @param   *irg   The ir graph the node  belongs to.
2345  * @param   *block The ir block the node belongs to.
2346  * @param   *op1   The first operand.
2347  * @param   *op2   The second operand.
2348  * @param   *mode  The mode of the operands and the result.
2349  */
2350 ir_node *new_r_Carry  (ir_graph *irg, ir_node *block,
2351                ir_node *op1, ir_node *op2, ir_mode *mode);
2352
2353 /**
2354  * Constructor for a Borrow node.
2355  *
2356  * @param   *irg   The ir graph the node  belongs to.
2357  * @param   *block The ir block the node belongs to.
2358  * @param   *op1   The first operand.
2359  * @param   *op2   The second operand.
2360  * @param   *mode  The mode of the operands and the results.
2361  */
2362 ir_node *new_r_Borrow (ir_graph *irg, ir_node *block,
2363                ir_node *op1, ir_node *op2, ir_mode *mode);
2364
2365 /** Constructor for a Phi node.
2366  *
2367  * @param *irg   The ir graph the node  belongs to.
2368  * @param *block The ir block the node belongs to.
2369  * @param arity  The number of predecessors
2370  * @param *in[]    Array with predecessors. The constructor copies this array.
2371  * @param *mode  The mode of it's inputs and output.
2372  */
2373 ir_node *new_r_Phi    (ir_graph *irg, ir_node *block, int arity,
2374                        ir_node *in[], ir_mode *mode);
2375
2376 /** Constructor for a Load node.
2377  *
2378  * @param *irg   The ir graph the node  belongs to.
2379  * @param *block The ir block the node belongs to.
2380  * @param *store The current memory
2381  * @param *adr   A pointer to the variable to be read in this memory.
2382  * @param *mode  The mode of the value to be loaded.
2383  */
2384 ir_node *new_r_Load   (ir_graph *irg, ir_node *block,
2385                ir_node *store, ir_node *adr, ir_mode *mode);
2386
2387 /** Constructor for a Store node.
2388  *
2389  * @param *irg   The ir graph the node  belongs to.
2390  * @param *block The ir block the node belongs to.
2391  * @param *store The current memory
2392  * @param *adr   A pointer to the variable to be read in this memory.
2393  * @param *val   The value to write to this variable.
2394  */
2395 ir_node *new_r_Store  (ir_graph *irg, ir_node *block,
2396                        ir_node *store, ir_node *adr, ir_node *val);
2397
2398 /** Constructor for a Alloc node.
2399  *
2400  * The Alloc node extends the memory by space for an entity of type alloc_type.
2401  *
2402  * @param *irg        The ir graph the node  belongs to.
2403  * @param *block      The ir block the node belongs to.
2404  * @param *store      The memory which shall contain the new variable.
2405  * @param *size       The number of bytes to allocate.
2406  * @param *alloc_type The type of the allocated variable.
2407  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
2408  */
2409 ir_node *new_r_Alloc  (ir_graph *irg, ir_node *block, ir_node *store,
2410                ir_node *size, ir_type *alloc_type, where_alloc where);
2411
2412 /** Constructor for a Free node.
2413  *
2414  * Frees the memory occupied by the entity pointed to by the pointer
2415  * arg.  Type indicates the type of the entity the argument points to.
2416  *
2417  * @param *irg        The ir graph the node  belongs to.
2418  * @param *block      The ir block the node belongs to.
2419  * @param *store      The memory which shall contain the new variable.
2420  * @param *ptr        The pointer to the object to free.
2421  * @param *size       The number of objects of type free_type to free in a sequence.
2422  * @param *free_type  The type of the freed variable.
2423  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
2424  */
2425 ir_node *new_r_Free   (ir_graph *irg, ir_node *block, ir_node *store,
2426                ir_node *ptr, ir_node *size, ir_type *free_type, where_alloc where);
2427
2428 /** Constructor for a  Sync node.
2429  *
2430  * Merges several memory values.  The node assumes that a variable
2431  * either occurs only in one of the memories, or it contains the same
2432  * value in all memories where it occurs.
2433  *
2434  * @param *irg      The ir graph the node  belongs to.
2435  * @param *block    The ir block the node belongs to.
2436  * @param  arity    The number of memories to synchronize.
2437  * @param  *in[]    An array of pointers to nodes that produce an output of  type memory.
2438  *                  The constructor copies this array.
2439  */
2440 ir_node *new_r_Sync   (ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
2441
2442 /** Constructor for a Proj node.
2443  *
2444  * Projects a single value out of a tuple.  The parameter proj gives the
2445  * position of the value within the tuple.
2446  *
2447  * @param *irg   The ir graph the node  belongs to.
2448  * @param *block The ir block the node belongs to.
2449  * @param arg    A node producing a tuple.
2450  * @param *mode  The mode of the value to project.
2451  * @param proj   The position of the value in the tuple.
2452  */
2453 ir_node *new_r_Proj   (ir_graph *irg, ir_node *block, ir_node *arg,
2454                        ir_mode *mode, long proj);
2455
2456 /** Constructor for a defaultProj node.
2457  *
2458  * Represents the default control flow of a Switch-Cond node.
2459  *
2460  * @param *irg      The ir graph the node  belongs to.
2461  * @param *block    The ir block the node belongs to.
2462  * @param arg       A node producing a tuple.
2463  * @param max_proj  The end  position of the value in the tuple.
2464  */
2465 ir_node *new_r_defaultProj (ir_graph *irg, ir_node *block, ir_node *arg, long max_proj);
2466
2467
2468 /** Constructor for a Tuple node.
2469  *
2470  * This is an auxiliary node to replace a node that returns a tuple
2471  * without changing the corresponding Proj nodes.
2472  *
2473  * @param *irg    The ir graph the node  belongs to.
2474  * @param *block  The ir block the node belongs to.
2475  * @param arity   The number of tuple elements.
2476  * @param *in[]   An array containing pointers to the nodes producing the tuple elements.
2477  *                The constructor copies this array.
2478  */
2479 ir_node *new_r_Tuple  (ir_graph *irg, ir_node *block, int arity, ir_node *in[]);
2480
2481 /** Constructor for a Id node.
2482  *
2483  * This is an auxiliary node to replace a node that returns a single
2484  * value.
2485  *
2486  * @param *irg    The ir graph the node  belongs to.
2487  * @param *block  The ir block the node belongs to.
2488  * @param *val    The operand to Id.
2489  * @param *mode   The mode of *val.
2490  */
2491 ir_node *new_r_Id     (ir_graph *irg, ir_node *block,
2492                ir_node *val, ir_mode *mode);
2493
2494 /** Constructor for a Bad node.
2495  *
2496  * Returns the unique Bad node of the graph.  The same as
2497  * get_irg_bad().
2498  *
2499  * @param *irg    The ir graph the node  belongs to.
2500  *
2501  */
2502 ir_node *new_r_Bad    (ir_graph *irg);
2503
2504 /** Constructor for a Confirm node.
2505  *
2506  * Specifies constraints for a value.  To support dataflow analyses.
2507  *
2508  * Example: If the value never exceeds '100' this is expressed by placing a
2509  * Confirm node val = new_d_Confirm(db, val, 100, '<') on the dataflow edge.
2510  *
2511  * @param *irg    The ir graph the node belong to.
2512  * @param *block  The ir block the node belong to.
2513  * @param *val    The value we express a constraint for
2514  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
2515  * @param cmp     The compare operation.
2516  */
2517 ir_node *new_r_Confirm (ir_graph *irg, ir_node *block,
2518             ir_node *val, ir_node *bound, pn_Cmp cmp);
2519
2520 /** Constructor for a Unknown node.
2521  *
2522  * Represents an arbitrary value.  Places the node in
2523  * the start block.
2524  *
2525  * @param *irg    The ir graph the node  belongs to.
2526  * @param *m      The mode of the unknown value.
2527  */
2528 ir_node *new_r_Unknown(ir_graph *irg, ir_mode *m);
2529
2530 /** Constructor for a CallBegin node.
2531  *
2532  * CallBegin represents control flow depending of the pointer value
2533  * representing the called method to the called methods.  The
2534  * constructor copies the method pointer input from the passed Call
2535  * node.
2536  *
2537  * @param *irg    The ir graph the node belong to.
2538  * @param *block  The block the node belong to.
2539  * @param *callee The call node visible in the  intra procedural view.
2540  */
2541 ir_node *new_r_CallBegin(ir_graph *irg, ir_node *block, ir_node *callee);
2542
2543 /** Constructor for a EndReg node.
2544  *
2545  * Used to represent regular procedure end in interprocedual view.
2546  *
2547  * @param *irg    The ir graph the node belong to.
2548  * @param *block  The block the node belong to.
2549  */
2550 ir_node *new_r_EndReg (ir_graph *irg, ir_node *block);
2551
2552 /** Constructor for a EndExcept node.
2553  *
2554  * Used to represent exceptional procedure end in interprocedural view.
2555  *
2556  * @param *irg    The ir graph the node belong to.
2557  * @param *block  The block the node belong to.
2558  */
2559 ir_node *new_r_EndExcept(ir_graph *irg, ir_node *block);
2560
2561 /** Constructor for a Break node.
2562  *
2563  * Break represents control flow to a single control successor just as Jmp.
2564  * The blocks separated by a break may not be concatenated by an optimization.
2565  * It is used for the interprocedural representation where blocks are parted
2566  * behind Call nodes to represent the control flow to called procedures.
2567  *
2568  * @param *irg    The ir graph the node belong to.
2569  * @param *block  The block the node belong to.
2570  */
2571 ir_node *new_r_Break  (ir_graph *irg, ir_node *block);
2572
2573 /** Constructor for a Filter node.
2574  *
2575  * Constructor for a Filter node. Adds the node to the block in current_ir_block.
2576  * Filter is a node with two views used to construct the interprocedural view.
2577  * In intraprocedural view its semantics are identical to the Proj node.
2578  * In interprocedural view the Filter performs the Phi operation on method
2579  * parameters or results.  Other than a Phi a Filter node may not be removed
2580  * if it has only a single input.
2581  *
2582  * The constructor builds the Filter in intraprocedural view.
2583  *
2584  * @param *irg    The ir graph the node belong to.
2585  * @param *block  The block the node belong to.
2586  * @param *arg  The tuple value to project from.
2587  * @param *mode The mode of the projected value.
2588  * @param proj  The position in the tuple to project from.
2589  */
2590 ir_node *new_r_Filter (ir_graph *irg, ir_node *block, ir_node *arg,
2591                ir_mode *mode, long proj);
2592
2593 /** Constructor for a NoMem node.
2594  *
2595  * Returns the unique NoMem node of the graph.  The same as
2596  * get_irg_no_mem().
2597  *
2598  * @param *irg    The ir graph the node belongs to.
2599  */
2600 ir_node *new_r_NoMem  (ir_graph *irg);
2601
2602 /** Constructor for a Mux node.
2603  *
2604  * @param *irg      The ir graph the node belong to.
2605  * @param *block    The block the node belong to.
2606  * @param *sel      The ir_node that calculates the boolean select.
2607  * @param *ir_true  The ir_node that calculates the true result.
2608  * @param *ir_false The ir_node that calculates the false result.
2609  * @param *mode     The mode of the node (and it_true and ir_false).
2610  */
2611 ir_node *new_r_Mux  (ir_graph *irg, ir_node *block,
2612     ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
2613
2614 /** Constructor for a CopyB node.
2615  *
2616  * @param *irg        The ir graph the node belong to.
2617  * @param *block      The block the node belong to.
2618  * @param *store      The current memory
2619  * @param *dst        The ir_node that represents the destination address.
2620  * @param *src        The ir_node that represents the source address.
2621  * @param *data_type  The type of the copied data
2622  */
2623 ir_node *new_r_CopyB(ir_graph *irg, ir_node *block,
2624     ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
2625
2626 /** Constructor for a InstOf node.
2627  *
2628  * A High-Level Type check.
2629  *
2630  * @param   *irg       The ir graph the node  belongs to.
2631  * @param   *block     The ir block the node belongs to.
2632  * @param   *store     The memory in which the object the entity should be selected
2633  *                     from is allocated.
2634  * @param   *objptr    A pointer to a object of a class type.
2635  * @param   *type      The type of which objptr must be.
2636  */
2637 ir_node *new_r_InstOf (ir_graph *irg, ir_node *block, ir_node *store,
2638                         ir_node *objptr, ir_type *type);
2639
2640 /** Constructor for a Raise node.
2641  *
2642  * A High-Level Exception throw.
2643  *
2644  * @param *irg   The ir graph the node  belongs to.
2645  * @param *block The ir block the node belongs to.
2646  * @param *store The current memory.
2647  * @param *obj   A pointer to the Except variable.
2648  */
2649 ir_node *new_r_Raise  (ir_graph *irg, ir_node *block,
2650                ir_node *store, ir_node *obj);
2651
2652 /** Constructor for a Bound node.
2653  *
2654  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
2655  *
2656  * @param *irg        The ir graph the node belong to.
2657  * @param *block      The block the node belong to.
2658  * @param *store      The current memory
2659  * @param *idx        The ir_node that represents an index.
2660  * @param *lower      The ir_node that represents the lower bound for the index.
2661  * @param *upper      The ir_node that represents the upper bound for the index.
2662  */
2663 ir_node *new_r_Bound(ir_graph *irg, ir_node *block,
2664     ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
2665
2666 /*-----------------------------------------------------------------------*/
2667 /* The block oriented interface                                          */
2668 /*-----------------------------------------------------------------------*/
2669
2670 /** Sets the current block in which the following constructors place the
2671  *  nodes they construct.
2672  *
2673  *  @param target  The new current block.
2674  */
2675 void     set_cur_block (ir_node *target);
2676
2677 /** Returns the current block of the current graph. */
2678 ir_node *get_cur_block(void);
2679
2680 /** Returns the fixed nodes  of the current graph. */
2681 #define get_cur_end_block()   get_irg_end_block(current_ir_graph)
2682 #define get_cur_end()         get_irg_end(current_ir_graph)
2683 #define get_cur_start_block() get_irg_start_block(current_ir_graph)
2684 #define get_cur_start()       get_irg_start(current_ir_graph)
2685
2686 /** Constructor for a Block node.
2687  *
2688  * Adds the block to the graph in current_ir_graph. Constructs a Block
2689  * with a fixed number of predecessors.  Does set current_block.  Can
2690  * be used with automatic Phi node construction.
2691  *
2692  * @param *db    A Pointer for debug information.
2693  * @param arity  The number of control predecessors.
2694  * @param in[]   An array of control predecessors.  The length of
2695  *               the array must be 'arity'.
2696  */
2697 ir_node *new_d_Block(dbg_info *db, int arity, ir_node *in[]);
2698
2699 /** Constructor for a Start node.
2700  *
2701  * Adds the node to the block in current_ir_block.
2702  *
2703  * @param *db    A pointer for debug information.
2704  */
2705 ir_node *new_d_Start  (dbg_info *db);
2706
2707 /** Constructor for a End node.
2708  *
2709  * Adds the node to the block in current_ir_block.
2710  *
2711  * @param *db     A pointer for debug information.
2712  */
2713 ir_node *new_d_End    (dbg_info *db);
2714
2715 /** Constructor for a Jmp node.
2716  *
2717  * Adds the node to the block in current_ir_block.
2718  *
2719  * Jmp represents control flow to a single control successor.
2720  *
2721  * @param *db     A pointer for debug information.
2722  */
2723 ir_node *new_d_Jmp    (dbg_info *db);
2724
2725 /** Constructor for an IJmp node.
2726  *
2727  * IJmp represents control flow to a single control successor not
2728  * statically known i.e. an indirect Jmp.
2729  *
2730  * @param *db     A pointer for debug information.
2731  * @param *tgt    The ir node representing the target address.
2732  */
2733 ir_node *new_d_IJmp   (dbg_info *db, ir_node *tgt);
2734
2735 /** Constructor for a Cond node.
2736  *
2737  * Adds the node to the block in current_ir_block.
2738  *
2739  * If c is mode_b represents a conditional branch (if/else). If c is
2740  * mode_Is/mode_Iu (?) represents a switch.  (Allocates dense Cond
2741  * node, default Proj is 0.)
2742  *
2743  * This is not consistent:  Input to Cond is Is, Proj has as proj number
2744  * longs.
2745  *
2746  * @param *db    A pointer for debug information.
2747  * @param *c     The conditions parameter.Can be of mode b or I_u.
2748  */
2749 ir_node *new_d_Cond   (dbg_info *db, ir_node *c);
2750
2751 /** Constructor for a Return node.
2752  *
2753  * Adds the node to the block in current_ir_block.
2754  *
2755  * Returns the memory an zero or more return values.  Only node that
2756  * can end regular control flow.
2757  *
2758  * @param *db    A pointer for debug information.
2759  * @param *store The state of memory.
2760  * @param arity  Number of array indices.
2761  * @param *in    Array with index inputs to the node.
2762  */
2763 ir_node *new_d_Return (dbg_info *db, ir_node *store, int arity, ir_node *in[]);
2764
2765 /** Constructor for a Const_type node.
2766  *
2767  * Adds the node to the block in current_ir_block.
2768  *
2769  * The constant represents a target value.  This constructor sets high
2770  * level type information for the constant value.
2771  *
2772  * @param *db    A pointer for debug information.
2773  * @param *mode  The mode of the operands and results.
2774  * @param *con   Points to an entry in the constant table. This pointer is
2775                  added to the attributes of the node.
2776  * @param *tp    The type of the constant.
2777  */
2778 ir_node *new_d_Const_type (dbg_info *db, ir_mode *mode, tarval *con, ir_type *tp);
2779
2780 /** Constructor for a Const node.
2781  *
2782  * Adds the node to the block in current_ir_block.
2783  *
2784  * Constructor for a Const node. The constant represents a target
2785  * value.  Sets the type information to type_unknown.  (No more
2786  * supported: If tv is entity derives a somehow useful type.)
2787  *
2788  * @param *db    A pointer for debug information.
2789  * @param *mode  The mode of the operands and results.
2790  * @param *con   Points to an entry in the constant table. This pointer is added
2791  *               to the attributes of the node.
2792  */
2793 ir_node *new_d_Const  (dbg_info *db, ir_mode *mode, tarval *con);
2794
2795 /** Constructor for a SymConst_type node.
2796  *
2797  *  Adds the node to the block in current_ir_block.
2798  *  This is the constructor for a symbolic constant.
2799  *    There are four kinds of symbolic constants:
2800  *    - type_tag  The symbolic constant represents a type tag.  The type the
2801  *                tag stands for is given explicitly.
2802  *    - size      The symbolic constant represents the size of a type.  The
2803  *                type of which the constant represents the size is given
2804  *                explicitly.
2805  *    - addr_name The symbolic constant represents the address of an entity
2806  *                (variable or method).  The variable is indicated by a name
2807  *                that is valid for linking.
2808  *    - addr_ent   The symbolic constant represents the address of an entity
2809  *                (variable or method).  The variable is given explicitly by
2810  *                a firm entity.
2811  *
2812  *    Inputs to the node:
2813  *      No inputs except the block it belongs to.
2814  *    Outputs of the node.
2815  *      An unsigned integer (I_u) or a pointer (P).
2816  *
2817  * @param *db     A pointer for debug information.
2818  * @param value   A type, entity or ident depending on the SymConst kind.
2819  * @param kind    The kind of the symbolic constant: symconst_type_tag, symconst_size
2820  *                or symconst_addr_name.
2821  * @param tp      The source type of the constant.
2822  */
2823 ir_node *new_d_SymConst_type (dbg_info *db, union symconst_symbol value, symconst_kind kind, ir_type *tp);
2824
2825 /** Constructor for a SymConst node.
2826  *
2827  *  Same as new_d_SymConst_type, except that it sets the type to type_unknown. */
2828 ir_node *new_d_SymConst (dbg_info *db, union symconst_symbol value, symconst_kind kind);
2829
2830 /** Constructor for a simpleSel node.
2831  *
2832  *  This is a shortcut for the new_d_Sel() constructor.  To be used for
2833  *  Sel nodes that do not select from an array, i.e., have no index
2834  *  inputs.  It adds the two parameters 0, NULL.
2835  *
2836  * @param   *db        A pointer for debug information.
2837  * @param   *store     The memory in which the object the entity should be
2838  *                     selected from is allocated.
2839  * @param   *objptr    The object from that the Sel operation selects a
2840  *                     single attribute out.
2841  * @param   *ent       The entity to select.
2842  */
2843 ir_node *new_d_simpleSel(dbg_info *db, ir_node *store, ir_node *objptr, entity *ent);
2844
2845 /** Constructor for a Sel node.
2846  *
2847  * The select node selects an entity (field or method) from an entity
2848  * with a compound type.  It explicitly specifies the entity selected.
2849  * Dynamically the node may select entities that overwrite the given
2850  * entity.  If the selected entity is an array element entity the Sel
2851  * node takes the required array indices as inputs.
2852  * Adds the node to the block in current_ir_block.
2853  *
2854  * @param   *db        A pointer for debug information.
2855  * @param   *store     The memory in which the object the entity should be selected
2856  *                     from is allocated.
2857  * @param   *objptr    A pointer to a compound entity the Sel operation selects a
2858  *                     single attribute from.
2859  * @param   arity      The number of array indices needed to select an array element entity.
2860  * @param   *in[]      If the compound entity is an array the indices of the selected
2861  *                     element entity.  The constructor copies this array.
2862  * @param   *ent       The entity to select.
2863  */
2864 ir_node *new_d_Sel    (dbg_info *db, ir_node *store, ir_node *objptr, int arity, ir_node *in[],
2865                      entity *ent);
2866
2867 /** Constructor for a Call node.
2868  *
2869  *  Represents all kinds of method and function calls.
2870  *  Adds the node to the block in current_ir_block.
2871  *
2872  * @param   *db     A pointer for debug information.
2873  * @param   *store  The actual store.
2874  * @param   *callee A pointer to the called procedure.
2875  * @param   arity   The number of procedure parameters.
2876  * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
2877  * @param   *tp     Type information of the procedure called.
2878  */
2879 ir_node *new_d_Call   (dbg_info *db, ir_node *store, ir_node *callee, int arity, ir_node *in[],
2880              ir_type *tp);
2881
2882 /** Constructor for a Add node.
2883  *
2884  * Adds the node to the block in current_ir_block.
2885  *
2886  * @param   *db    A pointer for debug information.
2887  * @param   *op1   The first operand.
2888  * @param   *op2   The second operand.
2889  * @param   *mode  The mode of the operands and the result.
2890  */
2891 ir_node *new_d_Add    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
2892
2893 /** Constructor for a Sub node.
2894  *
2895  * Adds the node to the block in current_ir_block.
2896  *
2897  * @param   *db    A pointer for debug information.
2898  * @param   *op1   The first operand.
2899  * @param   *op2   The second operand.
2900  * @param   *mode  The mode of the operands and the result.
2901  */
2902 ir_node *new_d_Sub    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
2903
2904 /** Constructor for a Minus node.
2905  *
2906  * Adds the node to the block in current_ir_block.
2907  *
2908  * @param   *db    A pointer for debug information.
2909  * @param   *op    The operand .
2910  * @param   *mode  The mode of the operand and the result.
2911  */
2912 ir_node *new_d_Minus  (dbg_info *db, ir_node *op,  ir_mode *mode);
2913
2914 /** Constructor for a Mul node.
2915  *
2916  * Adds the node to the block in current_ir_block.
2917  *
2918  * @param   *db    A pointer for debug information.
2919  * @param   *op1   The first operand.
2920  * @param   *op2   The second operand.
2921  * @param   *mode  The mode of the operands and the result.
2922  */
2923 ir_node *new_d_Mul    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
2924
2925 /** Constructor for a Quot node.
2926  *
2927  * Adds the node to the block in current_ir_block.
2928  *
2929  * @param   *db    A pointer for debug information.
2930  * @param   *memop The store needed to model exceptions
2931  * @param   *op1   The first operand.
2932  * @param   *op2   The second operand.
2933  */
2934 ir_node *new_d_Quot   (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2);
2935
2936 /** Constructor for a DivMod node.
2937  *
2938  * Adds the node to the block in current_ir_block.
2939  *
2940  * @param   *db    A pointer for debug information.
2941  * @param   *memop The store needed to model exceptions
2942  * @param   *op1   The first operand.
2943  * @param   *op2   The second operand.
2944  */
2945 ir_node *new_d_DivMod (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2);
2946
2947 /** Constructor for a Div node.
2948  *
2949  * Adds the node to the block in current_ir_block.
2950  *
2951  * @param   *db    A pointer for debug information.
2952  * @param   *memop The store needed to model exceptions
2953  * @param   *op1   The first operand.
2954  * @param   *op2   The second operand.
2955  */
2956 ir_node *new_d_Div    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2);
2957
2958 /** Constructor for a Mod node.
2959  *
2960  * Adds the node to the block in current_ir_block.
2961  *
2962  * @param   *db    A pointer for debug information.
2963  * @param   *memop The store needed to model exceptions
2964  * @param   *op1   The first operand.
2965  * @param   *op2   The second operand.
2966  */
2967 ir_node *new_d_Mod    (dbg_info *db, ir_node *memop, ir_node *op1, ir_node *op2);
2968
2969 /** Constructor for a Abs node.
2970  *
2971  * Adds the node to the block in current_ir_block.
2972  *
2973  * @param   *db    A pointer for debug information.
2974  * @param   *op    The operand
2975  * @param   *mode  The mode of the operands and the result.
2976  */
2977 ir_node *new_d_Abs    (dbg_info *db, ir_node *op,                ir_mode *mode);
2978
2979 /** Constructor for a And node.
2980  *
2981  * Adds the node to the block in current_ir_block.
2982  *
2983  * @param   *db    A pointer for debug information.
2984  * @param   *op1   The first operand.
2985  * @param   *op2   The second operand.
2986  * @param   *mode  The mode of the operands and the result.
2987  */
2988 ir_node *new_d_And    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
2989
2990 /** Constructor for a Or node.
2991  *
2992  * Adds the node to the block in current_ir_block.
2993  *
2994  * @param   *db    A pointer for debug information.
2995  * @param   *op1   The first operand.
2996  * @param   *op2   The second operand.
2997  * @param   *mode  The mode of the operands and the result.
2998  */
2999 ir_node *new_d_Or     (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
3000
3001 /** Constructor for a Eor node.
3002  *
3003  * Adds the node to the block in current_ir_block.
3004  *
3005  * @param   *db    A pointer for debug information.
3006  * @param   *op1   The first operand.
3007  * @param   *op2   The second operand.
3008  * @param   *mode  The mode of the operands and the results.
3009  */
3010 ir_node *new_d_Eor    (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
3011
3012 /** Constructor for a Not node.
3013  *
3014  * Adds the node to the block in current_ir_block.
3015  *
3016  * @param   *db    A pointer for debug information.
3017  * @param   *op    The operand.
3018  * @param   *mode  The mode of the operand and the result.
3019  */
3020 ir_node *new_d_Not    (dbg_info *db, ir_node *op,                ir_mode *mode);
3021
3022 /** Constructor for a Shl node.
3023  *
3024  * Adds the node to the block in current_ir_block.
3025  *
3026  * @param   *db    A pointer for debug information.
3027  * @param   *op    The operand.
3028  * @param   *k     The number of bits to  shift the operand .
3029  * @param   *mode  The mode of the operand and the result.
3030  */
3031 ir_node *new_d_Shl    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
3032
3033 /** Constructor for a Shr node.
3034  *
3035  * Adds the node to the block in current_ir_block.
3036  *
3037  * @param   *db    A pointer for debug information.
3038  * @param   *op    The operand.
3039  * @param   *k     The number of bits to  shift the operand .
3040  * @param   *mode  The mode of the operand and the result.
3041  */
3042 ir_node *new_d_Shr    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
3043
3044 /** Constructor for a Shrs node.
3045  *
3046  * Adds the node to the block in current_ir_block.
3047  *
3048  * @param   *db    A pointer for debug information.
3049  * @param   *op    The operand.
3050  * @param   *k     The number of bits to  shift the operand .
3051  * @param   *mode  The mode of the operand and the result.
3052  */
3053 ir_node *new_d_Shrs   (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
3054
3055 /** Constructor for a Rot node.
3056  *
3057  * Adds the node to the block in current_ir_block.
3058  *
3059  * @param   *db    A pointer for debug information.
3060  * @param   *op    The operand.
3061  * @param   *k     The number of bits to rotate the operand.
3062  * @param   *mode  The mode of the operand.
3063  */
3064 ir_node *new_d_Rot    (dbg_info *db, ir_node *op,  ir_node *k,   ir_mode *mode);
3065
3066 /** Constructor for a Cmp node.
3067  *
3068  * Adds the node to the block in current_ir_block.
3069  *
3070  * @param   *db    A pointer for debug information.
3071  * @param   *op1   The first operand.
3072  * @param   *op2   The second operand.
3073  */
3074 ir_node *new_d_Cmp    (dbg_info *db, ir_node *op1, ir_node *op2);
3075
3076 /** Constructor for a Conv node.
3077  *
3078  * Adds the node to the block in current_ir_block.
3079  *
3080  * @param   *db    A pointer for debug information.
3081  * @param   *op    The operand.
3082  * @param   *mode  The mode of this the operand muss be converted .
3083  */
3084 ir_node *new_d_Conv   (dbg_info *db, ir_node *op, ir_mode *mode);
3085
3086 /** Constructor for a Cast node.
3087  *
3088  * High level type cast
3089  * Adds the node to the block in current_ir_block.
3090  *
3091  * @param   *db    A pointer for debug information.
3092  * @param   *op    The operand.
3093  * @param   *to_tp The type of this the operand muss be casted .
3094  */
3095 ir_node *new_d_Cast   (dbg_info *db, ir_node *op, ir_type *to_tp);
3096
3097 /** Constructor for a Carry node.
3098  *
3099  * Adds the node to the block in current_ir_block.
3100  *
3101  * @param   *db    A pointer for debug information.
3102  * @param   *op1   The first operand.
3103  * @param   *op2   The second operand.
3104  * @param   *mode  The mode of the operands and the result.
3105  */
3106 ir_node *new_d_Carry  (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
3107
3108 /** Constructor for a Borrow node.
3109  *
3110  * Adds the node to the block in current_ir_block.
3111  *
3112  * @param   *db    A pointer for debug information.
3113  * @param   *op1   The first operand.
3114  * @param   *op2   The second operand.
3115  * @param   *mode  The mode of the operands and the result.
3116  */
3117 ir_node *new_d_Borrow (dbg_info *db, ir_node *op1, ir_node *op2, ir_mode *mode);
3118
3119 /** Constructor for a Phi node.
3120  *
3121  * Adds the node to the block in current_ir_block.
3122  *
3123  * @param *db    A pointer for debug information.
3124  * @param arity  The number of predecessors
3125  * @param *in    Array with predecessors
3126  * @param *mode  The mode of it's inputs and output.
3127  */
3128 ir_node *new_d_Phi    (dbg_info *db, int arity, ir_node *in[], ir_mode *mode);
3129
3130 /** Constructor for a Load node.
3131  *
3132  * Adds the node to the block in current_ir_block.
3133  *
3134  * @param *db    A pointer for debug information.
3135  * @param *store The current memory
3136  * @param *addr  A pointer to the variable to be read in this memory.
3137  * @param *mode  The mode of the value to be loaded.
3138  */
3139 ir_node *new_d_Load   (dbg_info *db, ir_node *store, ir_node *addr, ir_mode *mode);
3140
3141 /** Constructor for a Store node.
3142  *
3143  * Adds the node to the block in current_ir_block.
3144  *
3145  * @param *db    A pointer for debug information.
3146  * @param *store The current memory
3147  * @param *addr  A pointer to the variable to be read in this memory.
3148  * @param *val   The value to write to this variable.
3149  */
3150 ir_node *new_d_Store  (dbg_info *db, ir_node *store, ir_node *addr, ir_node *val);
3151
3152 /** Constructor for a Alloc node.
3153  *
3154  * The Alloc node extends the memory by space for an entity of type alloc_type.
3155  * Adds the node to the block in current_ir_block.
3156  *
3157  * @param *db         A pointer for debug information.
3158  * @param *store      The memory which shall contain the new variable.
3159  * @param *size       The number of bytes to allocate.
3160  * @param *alloc_type The type of the allocated variable.
3161  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
3162  */
3163 ir_node *new_d_Alloc  (dbg_info *db, ir_node *store, ir_node *size, ir_type *alloc_type,
3164                      where_alloc where);
3165
3166  /** Constructor for a Free node.
3167  *
3168  * Frees the memory occupied by the entity pointed to by the pointer
3169  * arg.  Type indicates the type of the entity the argument points to.
3170  * Adds the node to the block in current_ir_block.
3171  *
3172  * @param *db         A pointer for debug information.
3173  * @param *store      The memory which shall contain the new variable.
3174  * @param *ptr        The pointer to the object to free.
3175  * @param *size       The number of objects of type free_type to free in a sequence.
3176  * @param *free_type  The type of the freed variable.
3177  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
3178  */
3179 ir_node *new_d_Free   (dbg_info *db, ir_node *store, ir_node *ptr, ir_node *size,
3180              ir_type *free_type, where_alloc where);
3181
3182 /** Constructor for a Sync node.
3183  *
3184  * Merges several memory values.  The node assumes that a variable
3185  * either occurs only in one of the memories, or it contains the same
3186  * value in all memories where it occurs.
3187  * Adds the node to the block in current_ir_block.
3188  *
3189  * @param *db       A pointer for debug information.
3190  * @param  arity    The number of memories to synchronize.
3191  * @param  **in     An array of pointers to nodes that produce an output of type
3192  *                  memory.  The constructor copies this array.
3193  */
3194 ir_node *new_d_Sync   (dbg_info *db, int arity, ir_node *in[]);
3195
3196 /** Constructor for a Proj node.
3197  *
3198  * Projects a single value out of a tuple.  The parameter proj gives the
3199  * position of the value within the tuple.
3200  * Adds the node to the block in current_ir_block.
3201  *
3202  * @param *db    A pointer for deubug information.
3203  * @param arg    A node producing a tuple.
3204  * @param *mode  The mode of the value to project.
3205  * @param proj   The position of the value in the tuple.
3206  */
3207 ir_node *new_d_Proj   (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
3208
3209 /** Constructor for a defaultProj node.
3210  *
3211  * Represents the default control flow of a Switch-Cond node.
3212  * Adds the node to the block in current_ir_block.
3213  *
3214  * @param *db       A pointer for debug information.
3215  * @param arg       A node producing a tuple.
3216  * @param max_proj  The end  position of the value in the tuple.
3217  */
3218 ir_node *new_d_defaultProj (dbg_info *db, ir_node *arg, long max_proj);
3219
3220 /** Constructor for a Tuple node.
3221  *
3222  * This is an auxiliary node to replace a node that returns a tuple
3223  * without changing the corresponding Proj nodes.
3224  * Adds the node to the block in current_ir_block.
3225  *
3226  * @param *db     A pointer for debug information.
3227  * @param arity   The number of tuple elements.
3228  * @param **in    An array containing pointers to the nodes producing the tuple elements.
3229  */
3230 ir_node *new_d_Tuple  (dbg_info *db, int arity, ir_node *in[]);
3231
3232 /** Constructor for a Id node.
3233  *
3234  * This is an auxiliary node to replace a node that returns a single
3235  * value. Adds the node to the block in current_ir_block.
3236  *
3237  * @param *db     A pointer for debug information.
3238  * @param *val    The operand to Id.
3239  * @param *mode   The mode of *val.
3240  */
3241 ir_node *new_d_Id     (dbg_info *db, ir_node *val, ir_mode *mode);
3242
3243 /** Constructor for a Bad node.
3244  *
3245  * Returns the unique Bad node of the graph.  The same as
3246  * get_irg_bad().
3247  */
3248 ir_node *new_d_Bad    (void);
3249
3250 /** Constructor for a Confirm node.
3251  *
3252  * Constructor for a Confirm node. Adds the node to the block in current_ir_block.
3253  * Specifies constraints for a value.  To support dataflow analyses.
3254  *
3255  * Example: If the value never exceeds '100' this is expressed by placing a
3256  * Confirm node val = new_d_Confirm(db, val, 100, '<') on the dataflow edge.
3257  *
3258  * @param *db     A pointer for debug information.
3259  * @param *val    The value we express a constraint for
3260  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
3261  * @param cmp     The compare operation.
3262  */
3263 ir_node *new_d_Confirm (dbg_info *db, ir_node *val, ir_node *bound, pn_Cmp cmp);
3264
3265 /** Constructor for an Unknown node.
3266  *
3267  * Represents an arbitrary value.  Places the node in
3268  * the start block.
3269  *
3270  * @param *m      The mode of the unknown value.
3271  */
3272 ir_node *new_d_Unknown(ir_mode *m);
3273
3274 /** Constructor for a CallBegin node.
3275  *
3276  * CallBegin represents control flow depending of the pointer value
3277  * representing the called method to the called methods.  The
3278  * constructor copies the method pointer input from the passed Call
3279  * node.Adds the node to the block in current_ir_block.
3280  *
3281  * @param *db     A pointer for debug information.
3282  * @param *callee The call node visible in the  intra procedural view.
3283  */
3284 ir_node *new_d_CallBegin(dbg_info *db, ir_node *callee);
3285
3286 /** Constructor for an EndReg node.
3287  *
3288  *Adds the node to the block in current_ir_block.
3289  *
3290  * @param *db     A pointer for debug information.
3291  */
3292 ir_node *new_d_EndReg (dbg_info *db);
3293
3294 /** Constructor for an EndExcept node.
3295  *
3296  * Used to represent regular procedure end in interprocedual view.
3297  * Adds the node to the block in current_ir_block.
3298  *
3299  * @param *db     A pointer for debug information.
3300  */
3301 ir_node *new_d_EndExcept(dbg_info *db);
3302
3303 /** Constructor for a Break node.
3304  *
3305  * Used to represent exceptional procedure end in interprocedural view.
3306  * Adds the node to the block in current_ir_block.
3307  *
3308  * Break represents control flow to a single control successor just as Jmp.
3309  * The blocks separated by a break may not be concatenated by an optimization.
3310  * It is used for the interprocedural representation where blocks are parted
3311  * behind Call nodes to represent the control flow to called procedures.
3312  *
3313  * @param *db     A pointer for debug information.
3314  */
3315 ir_node *new_d_Break (dbg_info *db);
3316
3317 /** Constructor for a Filter node.
3318  *
3319  * Constructor for a Filter node. Adds the node to the block in
3320  * current_ir_block.  Filter is a node with two views used to
3321  * construct the interprocedural view.  In intraprocedural view its
3322  * semantics are identical to the Proj node.  In interprocedural view
3323  * the Filter performs the Phi operation on method parameters or
3324  * results.  Other than a Phi a Filter node may not be removed if it
3325  * has only a single input.
3326  *
3327  * The constructor builds the Filter in intraprocedural view.
3328  *
3329  * @param *db   A pointer for debug information.
3330  * @param *arg  The tuple value to project from.
3331  * @param *mode The mode of the projected value.
3332  * @param proj  The position in the tuple to project from.
3333  */
3334 ir_node *new_d_Filter (dbg_info *db, ir_node *arg, ir_mode *mode, long proj);
3335
3336
3337 /** Constructor for a NoMem node.
3338  *
3339  * Returns the unique NoMem node of the graph.  The same as
3340  * get_irg_no_mem().
3341  */
3342 ir_node *new_d_NoMem  (void);
3343
3344 /** Constructor for a Mux node.
3345  *
3346  * @param *db       A pointer for debug information.
3347  * @param *sel      The ir_node that calculates the boolean select.
3348  * @param *ir_true  The ir_node that calculates the true result.
3349  * @param *ir_false The ir_node that calculates the false result.
3350  * @param *mode     The mode of the node (and it_true and ir_false).
3351  */
3352 ir_node *new_d_Mux  (dbg_info *db, ir_node *sel,
3353     ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
3354
3355 /** Constructor for a CopyB node.
3356  *
3357  * @param *db         A pointer for debug information.
3358  * @param *store      The current memory
3359  * @param *dst        The ir_node that represents the destination address.
3360  * @param *src        The ir_node that represents the source address.
3361  * @param *data_type  The type of the copied data
3362  */
3363 ir_node *new_d_CopyB(dbg_info *db, ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
3364
3365 /** Constructor for a InstOf node.
3366  *
3367  * A High-Level Type check.
3368  *
3369  * @param   *db        A pointer for debug information.
3370  * @param   *store     The memory in which the object the entity should be selected
3371  *                     from is allocated.
3372  * @param   *objptr    A pointer to a object of a class type.
3373  * @param   *type      The type of which objptr must be.
3374  */
3375 ir_node *new_d_InstOf (dbg_info *db, ir_node *store, ir_node *objptr, ir_type *type);
3376
3377 /** Constructor for a Raise node.
3378  *
3379  * A High-Level Exception throw.
3380  *
3381  * @param *db    A pointer for debug information.
3382  * @param *store The current memory.
3383  * @param *obj   A pointer to the Except variable.
3384  */
3385 ir_node *new_d_Raise  (dbg_info *db, ir_node *store, ir_node *obj);
3386
3387 /** Constructor for a Bound node.
3388  *
3389  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
3390  *
3391  * @param *db         A pointer for debug information.
3392  * @param *store      The current memory
3393  * @param *idx        The ir_node that represents an index.
3394  * @param *lower      The ir_node that represents the lower bound for the index.
3395  * @param *upper      The ir_node that represents the upper bound for the index.
3396  */
3397 ir_node *new_d_Bound(dbg_info *db, ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
3398
3399 /*-----------------------------------------------------------------------*/
3400 /* The block oriented interface without debug support                    */
3401 /*-----------------------------------------------------------------------*/
3402
3403 /* Needed from the interface with debug support:
3404 void set_cur_block (ir_node *target);   */
3405
3406 /** Constructor for a Block node.
3407  *
3408  * Constructor for a Block node. Adds the block to the graph in
3409  * current_ir_graph.  Constructs a Block with a fixed number of
3410  * predecessors.  Does set current_block.  Can be used with automatic
3411  * Phi node construction.
3412  *
3413  * @param arity  The number of control predecessors.
3414  * @param in     An array of control predecessors.  The length of
3415  *               the array must be 'arity'.
3416  */
3417 ir_node *new_Block(int arity, ir_node *in[]);
3418
3419 /** Constructor for a Start node.
3420  *
3421  * Adds the node to the block in current_ir_block.
3422  *
3423  */
3424 ir_node *new_Start  (void);
3425
3426 /** Constructor for an End node.
3427  *
3428  * Adds the node to the block in current_ir_block.
3429  */
3430 ir_node *new_End    (void);
3431
3432 /** Constructor for an EndReg node.
3433  *
3434  * Used to represent regular procedure end in interprocedual view.
3435  * Adds the node to the block in current_ir_block.
3436  */
3437 ir_node *new_EndReg (void);
3438
3439 /** Constructor for an EndExpcept node.
3440  *
3441  *  Used to represent exceptional procedure end in interprocedural view.
3442  *  Adds the node to the block in current_ir_block.
3443  */
3444 ir_node *new_EndExcept(void);
3445
3446 /** Constructor for a Jump node.
3447  *
3448  * Adds the node to the block in current_ir_block.
3449  *
3450  * Jmp represents control flow to a single control successor.
3451  */
3452 ir_node *new_Jmp    (void);
3453
3454 /** Constructor for an IJmp node.
3455  *
3456  * IJmp represents control flow to a single control successor not
3457  * statically known i.e. an indirect Jmp.
3458  *
3459  * @param *tgt    The ir node representing the target address.
3460  */
3461 ir_node *new_IJmp   (ir_node *tgt);
3462
3463 /** Constructor for a Break node.
3464  * Break represents control flow to a single control successor just as Jmp.
3465  * The blocks separated by a break may not be concatenated by an optimization.
3466  * It is used for the interprocedural representation where blocks are parted
3467  * behind Call nodes to represent the control flow to called procedures.
3468  * Adds the node to the block in current_ir_block.
3469  */
3470 ir_node *new_Break  (void);
3471
3472 /** Constructor for a Cond node.
3473  *
3474  * If c is mode_b represents a conditional branch (if/else). If c is
3475  * mode_Is/mode_Iu (?) represents a switch.  (Allocates dense Cond
3476  * node, default Proj is 0.). Adds the node to the block in current_ir_block.
3477  *
3478  * This is not consistent:  Input to Cond is Is, Proj has as proj number
3479  * longs.
3480  *
3481  *
3482  * @param *c     The conditions parameter.Can be of mode b or I_u.
3483  */
3484 ir_node *new_Cond   (ir_node *c);
3485
3486 /** Constructor for a Return node.
3487  *
3488  * Returns the memory an zero or more return values.  Only node that
3489  * can end regular control flow. Adds the node to the block in current_ir_block.
3490  *
3491  * @param *store The state of memory.
3492  * @param arity  Number of array indices.
3493  * @param *in    Array with index inputs to the node.
3494  */
3495 ir_node *new_Return (ir_node *store, int arity, ir_node *in[]);
3496
3497 /** Constructor for a Const node.
3498  *
3499  * Constructor for a Const node. The constant represents a target
3500  * value.  Sets the type information to type_unknown.  (No more
3501  * supported: If tv is entity derives a somehow useful type.)
3502  * Adds the node to the block in current_ir_block.
3503  *
3504  * @param *mode  The mode of the operands and results.
3505  * @param *con   Points to an entry in the constant table. This pointer is
3506  *               added to the attributes of  the node.
3507  */
3508 ir_node *new_Const  (ir_mode *mode, tarval *con);
3509
3510 /**
3511  * Make a const from a long.
3512  * This is just convenience for the usual
3513  * <code>
3514  * new_Const(mode, tarval_from_long(mode, ...))
3515  * </code>
3516  * pain.
3517  * @param mode The mode for the const.
3518  * @param value The value of the constant.
3519  * @return A new const node.
3520  */
3521 ir_node *new_Const_long(ir_mode *mode, long value);
3522
3523 /** Constructor for a Const node.
3524  *
3525  * Derives mode from passed type. */
3526 ir_node *new_Const_type(tarval *con, ir_type *tp);
3527
3528 /** Constructor for a SymConst node.
3529  *
3530  * Adds the node to the block in current_ir_block.
3531  * This is the constructor for a symbolic constant.
3532  * There are four kinds of symbolic constants:
3533  *    -# type_tag  The symbolic constant represents a type tag.  The type the
3534  *                 tag stands for is given explicitly.
3535  *    -# size      The symbolic constant represents the size of a type.  The
3536  *                 type of which the constant represents the size is given
3537  *                 explicitly.
3538  *    -# addr_name The symbolic constant represents the address of an entity
3539  *                 (variable or method).  The variable is indicated by a name
3540  *                 that is valid for linking.
3541  *    -# addr_ent  The symbolic constant represents the address of an entity
3542  *                 (variable or method).  The variable is given explicitly by
3543  *                 a firm entity.
3544  *
3545  *    Inputs to the node:
3546  *      No inputs except the block it belongs to.
3547  *    Outputs of the node.
3548  *      An unsigned integer (I_u) or a pointer (P).
3549  *
3550  * @param value   A type or a ident depending on the SymConst kind.
3551  * @param kind    The kind of the symbolic constant: symconst_type_tag, symconst_size or symconst_addr_name.
3552  */
3553 ir_node *new_SymConst (union symconst_symbol value, symconst_kind kind);
3554
3555 /** Constructor for a simpelSel node.
3556  *
3557  *  This is a shortcut for the new_Sel() constructor.  To be used for
3558  *  Sel nodes that do not select from an array, i.e., have no index
3559  *  inputs.  It adds the two parameters 0, NULL.
3560  *
3561  * @param   *store     The memory in which the object the entity should be selected from is allocated.
3562  * @param   *objptr    The object from that the Sel operation selects a single attribute out.
3563  * @param   *ent       The entity to select.
3564  */
3565 ir_node *new_simpleSel(ir_node *store, ir_node *objptr, entity *ent);
3566
3567 /** Constructor for a Sel node.
3568  *
3569  * The select node selects an entity (field or method) from an entity
3570  * with a compound type.  It explicitly specifies the entity selected.
3571  * Dynamically the node may select entities that overwrite the given
3572  * entity.  If the selected entity is an array element entity the Sel
3573  * node takes the required array indices as inputs.
3574  * Adds the node to the block in current_ir_block.
3575  *
3576  * @param   *store     The memory in which the object the entity should be selected
3577  *                     from is allocated.
3578  * @param   *objptr    A pointer to a compound entity the Sel operation selects a
3579  *                     single attribute from.
3580  * @param   arity      The number of array indices needed to select an array element entity.
3581  * @param   *in[]      If the compound entity is an array the indices of the selected
3582  *                     element entity.  The constructor copies this array.
3583  * @param   *ent       The entity to select.
3584  */
3585 ir_node *new_Sel    (ir_node *store, ir_node *objptr, int arity, ir_node *in[],
3586                      entity *ent);
3587
3588 /** Constructor for a Call node.
3589  *
3590  *  Adds the node to the block in current_ir_block.
3591  *  Represents all kinds of method and function calls.
3592  *
3593  * @param   *store  The actual store.
3594  * @param   *callee A pointer to the called procedure.
3595  * @param   arity   The number of procedure parameters.
3596  * @param   *in[]   An array with the pointers to the parameters. The constructor copies this array.
3597  * @param   *tp     Type information of the procedure called.
3598  */
3599 ir_node *new_Call   (ir_node *store, ir_node *callee, int arity, ir_node *in[],
3600                      ir_type *tp);
3601
3602 /** Constructor for a CallBegin node.
3603  *
3604  * CallBegin represents control flow depending of the pointer value
3605  * representing the called method to the called methods.  The
3606  * constructor copies the method pointer input from the passed Call
3607  * node. Adds the node to the block in current_ir_block.
3608  *
3609  * @param   *callee A pointer to the called procedure.
3610  */
3611 ir_node *new_CallBegin(ir_node *callee);
3612
3613 /** Constructor for a Add node.
3614  *
3615  * Adds the node to the block in current_ir_block.
3616  *
3617  * @param   *op1   The first operand.
3618  * @param   *op2   The second operand.
3619  * @param   *mode  The mode of the operands and the result.
3620  */
3621 ir_node *new_Add    (ir_node *op1, ir_node *op2, ir_mode *mode);
3622
3623 /** Constructor for a Sub node.
3624  *
3625  * Adds the node to the block in current_ir_block.
3626  *
3627  * @param   *op1   The first operand.
3628  * @param   *op2   The second operand.
3629  * @param   *mode  The mode of the operands and the result.
3630  */
3631 ir_node *new_Sub    (ir_node *op1, ir_node *op2, ir_mode *mode);
3632
3633 /** Constructor for a Minus node.
3634  *
3635  * Adds the node to the block in current_ir_block.
3636  *
3637  * @param   *op    The operand .
3638  * @param   *mode  The mode of the operand and the result.
3639  */
3640 ir_node *new_Minus  (ir_node *op,  ir_mode *mode);
3641
3642 /**
3643  * Constructor for a Mul node. Adds the node to the block in current_ir_block.
3644  *
3645  * @param   *op1   The first operand.
3646  * @param   *op2   The second operand.
3647  * @param   *mode  The mode of the operands and the result.
3648  */
3649 ir_node *new_Mul    (ir_node *op1, ir_node *op2, ir_mode *mode);
3650
3651 /** Constructor for a Quot node.
3652  *
3653  * Adds the node to the block in current_ir_block.
3654  *
3655  * @param   *memop The store needed to model exceptions
3656  * @param   *op1   The first operand.
3657  * @param   *op2   The second operand.
3658  */
3659 ir_node *new_Quot   (ir_node *memop, ir_node *op1, ir_node *op2);
3660
3661 /** Constructor for a DivMod node.
3662  *
3663  * Adds the node to the block in current_ir_block.
3664  *
3665  * @param   *memop The store needed to model exceptions
3666  * @param   *op1   The first operand.
3667  * @param   *op2   The second operand.
3668  */
3669 ir_node *new_DivMod (ir_node *memop, ir_node *op1, ir_node *op2);
3670
3671 /** Constructor for a Div node.
3672  *
3673  * Adds the node to the block in current_ir_block.
3674  *
3675  * @param   *memop The store needed to model exceptions
3676  * @param   *op1   The first operand.
3677  * @param   *op2   The second operand.
3678  */
3679 ir_node *new_Div    (ir_node *memop, ir_node *op1, ir_node *op2);
3680
3681 /** Constructor for a Mod node.
3682  *
3683  * Adds the node to the block in current_ir_block.
3684  *
3685  * @param   *memop The store needed to model exceptions
3686  * @param   *op1   The first operand.
3687  * @param   *op2   The second operand.
3688  */
3689 ir_node *new_Mod    (ir_node *memop, ir_node *op1, ir_node *op2);
3690
3691 /** Constructor for a Abs node.
3692  *
3693  * Adds the node to the block in current_ir_block.
3694  *
3695  * @param   *op    The operand
3696  * @param   *mode  The mode of the operands and the result.
3697  */
3698 ir_node *new_Abs    (ir_node *op,                ir_mode *mode);
3699
3700 /** Constructor for a And node.
3701  *
3702  * Adds the node to the block in current_ir_block.
3703  *
3704  * @param   *op1   The first operand.
3705  * @param   *op2   The second operand.
3706  * @param   *mode  The mode of the operands and the result.
3707  */
3708 ir_node *new_And    (ir_node *op1, ir_node *op2, ir_mode *mode);
3709
3710 /**
3711  * Constructor for a Or node. Adds the node to the block in current_ir_block.
3712  *
3713  * @param   *op1   The first operand.
3714  * @param   *op2   The second operand.
3715  * @param   *mode  The mode of the operands and the result.
3716  */
3717 ir_node *new_Or     (ir_node *op1, ir_node *op2, ir_mode *mode);
3718
3719 /**
3720  * Constructor for a Eor node. Adds the node to the block in current_ir_block.
3721  *
3722  * @param   *op1   The first operand.
3723  * @param   *op2   The second operand.
3724  * @param   *mode  The mode of the operands and the results.
3725  */
3726 ir_node *new_Eor    (ir_node *op1, ir_node *op2, ir_mode *mode);
3727
3728 /** Constructor for a Not node.
3729  *
3730  * Adds the node to the block in current_ir_block.
3731  *
3732  * @param   *op    The operand.
3733  * @param   *mode  The mode of the operand and the result.
3734  */
3735 ir_node *new_Not    (ir_node *op,                ir_mode *mode);
3736
3737 /** Constructor for a Shl node.
3738  *
3739  * Adds the node to the block in current_ir_block.
3740  *
3741  * @param   *op    The operand.
3742  * @param   *k     The number of bits to  shift the operand .
3743  * @param   *mode  The mode of the operand and the result.
3744  */
3745 ir_node *new_Shl    (ir_node *op,  ir_node *k,   ir_mode *mode);
3746
3747 /**
3748  * Constructor for a Shr node. Adds the node to the block in current_ir_block.
3749  *
3750  * @param   *op    The operand.
3751  * @param   *k     The number of bits to  shift the operand .
3752  * @param   *mode  The mode of the operand and the result.
3753  */
3754 ir_node *new_Shr    (ir_node *op,  ir_node *k,   ir_mode *mode);
3755
3756 /** Constructor for a Shrs node.
3757  *
3758  * Adds the node to the block in current_ir_block.
3759  *
3760  * @param   *op    The operand.
3761  * @param   *k     The number of bits to  shift the operand .
3762  * @param   *mode  The mode of the operand and the result.
3763  */
3764 ir_node *new_Shrs   (ir_node *op,  ir_node *k,   ir_mode *mode);
3765
3766 /** Constructor for a Rot node.
3767  *
3768  * Adds the node to the block in current_ir_block.
3769  *
3770  * @param   *op    The operand.
3771  * @param   *k     The number of bits to rotate the operand.
3772  * @param   *mode  The mode of the operand.
3773  */
3774 ir_node *new_Rot    (ir_node *op,  ir_node *k,   ir_mode *mode);
3775
3776 /** Constructor for a Cmp node.
3777  *
3778  * Adds the node to the block in current_ir_block.
3779  *
3780  * @param   *op1   The first operand.
3781  * @param   *op2   The second operand.
3782  */
3783 ir_node *new_Cmp    (ir_node *op1, ir_node *op2);
3784
3785 /** Constructor for a Conv node.
3786  *
3787  * Adds the node to the block in current_ir_block.
3788  *
3789  * @param   *op    The operand.
3790  * @param   *mode  The mode of this the operand muss be converted .
3791  */
3792 ir_node *new_Conv   (ir_node *op, ir_mode *mode);
3793
3794 /** Constructor for a Cast node.
3795  *
3796  * Adds the node to the block in current_ir_block.
3797  * High level type cast
3798  *
3799  * @param   *op    The operand.
3800  * @param   *to_tp The type of this the operand muss be casted .
3801  */
3802 ir_node *new_Cast   (ir_node *op, ir_type *to_tp);
3803
3804 /** Constructor for a Carry node.
3805  *
3806  * Adds the node to the block in current_ir_block.
3807  *
3808  * @param   *op1   The first operand.
3809  * @param   *op2   The second operand.
3810  * @param   *mode  The mode of the operands and the result.
3811  */
3812 ir_node *new_Carry  (ir_node *op1, ir_node *op2, ir_mode *mode);
3813
3814 /** Constructor for a Borrow node.
3815  *
3816  * Adds the node to the block in current_ir_block.
3817  *
3818  * @param   *op1   The first operand.
3819  * @param   *op2   The second operand.
3820  * @param   *mode  The mode of the operands and the result.
3821  */
3822 ir_node *new_Borrow (ir_node *op1, ir_node *op2, ir_mode *mode);
3823
3824 /** Constructor for a Phi node.
3825  *
3826  * Adds the node to the block in current_ir_block.
3827  *
3828  * @param arity  The number of predecessors.
3829  * @param *in    Array with predecessors.
3830  * @param *mode  The mode of it's inputs and output.
3831  */
3832 ir_node *new_Phi    (int arity, ir_node *in[], ir_mode *mode);
3833
3834 /** Constructor for a Load node.
3835  *
3836  * @param *store  The current memory.
3837  * @param *addr   A pointer to the variable to be read in this memory.
3838  * @param *mode   The mode of the value to be loaded.
3839  */
3840 ir_node *new_Load   (ir_node *store, ir_node *addr, ir_mode *mode);
3841
3842 /** Constructor for a Store node.
3843  *
3844  * @param *store  The current memory.
3845  * @param *addr   A pointer to the variable to be read in this memory.
3846  * @param *val    The value to write to this variable.
3847  */
3848 ir_node *new_Store  (ir_node *store, ir_node *addr, ir_node *val);
3849
3850 /** Constructor for a Alloc node.
3851  *
3852  * The Alloc node extends the memory by space for an entity of type alloc_type.
3853  * Adds the node to the block in current_ir_block.
3854  *
3855  * @param *store      The memory which shall contain the new variable.
3856  * @param *size       The number of bytes to allocate.
3857  * @param *alloc_type The type of the allocated variable.
3858  * @param where       Where to allocate the variable, either heap_alloc or stack_alloc.
3859  */
3860 ir_node *new_Alloc  (ir_node *store, ir_node *size, ir_type *alloc_type,
3861                      where_alloc where);
3862
3863 /** Constructor for a Free node.
3864  *
3865  * Frees the memory occupied by the entity pointed to by the pointer
3866  * arg.  Type indicates the type of the entity the argument points to.
3867  * Adds the node to the block in current_ir_block.
3868  *
3869  * @param *store      The memory which shall contain the new variable.
3870  * @param *ptr        The pointer to the object to free.
3871  * @param *size       The number of objects of type free_type to free in a sequence.
3872  * @param *free_type  The type of the freed variable.
3873  * @param where       Where the variable was allocated, either heap_alloc or stack_alloc.
3874  */
3875 ir_node *new_Free   (ir_node *store, ir_node *ptr, ir_node *size,
3876                      ir_type *free_type, where_alloc where);
3877
3878 /** Constructor for a  Sync node.
3879  *
3880  * Merges several memory values.  The node assumes that a variable
3881  * either occurs only in one of the memories, or it contains the same
3882  * value in all memories where it occurs.
3883  * Adds the node to the block in current_ir_block.
3884  *
3885  * @param  arity    The number of memories to synchronize.
3886  * @param  **in     An array of pointers to nodes that produce an output of type
3887  *                  memory.  The constructor copies this array.
3888  */
3889 ir_node *new_Sync   (int arity, ir_node *in[]);
3890
3891 /** Constructor for a Proj node.
3892  *
3893  * Projects a single value out of a tuple.  The parameter proj gives the
3894  * position of the value within the tuple.
3895  * Adds the node to the block in current_ir_block.
3896  *
3897  * @param arg    A node producing a tuple.
3898  * @param *mode  The mode of the value to project.
3899  * @param proj   The position of the value in the tuple.
3900  */
3901 ir_node *new_Proj   (ir_node *arg, ir_mode *mode, long proj);
3902
3903 /** Constructor for a Filter node.
3904  *
3905  * Constructor for a Filter node. Adds the node to the block in current_ir_block.
3906  * Filter is a node with two views used to construct the interprocedural view.
3907  * In intraprocedural view its semantics are identical to the Proj node.
3908  * In interprocedural view the Filter performs the Phi operation on method
3909  * parameters or results.  Other than a Phi a Filter node may not be removed
3910  * if it has only a single input.
3911  *
3912  * The constructor builds the Filter in intraprocedural view.
3913  *
3914  * @param *arg  The tuple value to project from.
3915  * @param *mode The mode of the projected value.
3916  * @param proj  The position in the tuple to project from.
3917  */
3918 ir_node *new_Filter (ir_node *arg, ir_mode *mode, long proj);
3919
3920 /** Constructor for a defaultProj node.
3921  *
3922  * Represents the default control flow of a Switch-Cond node.
3923  * Adds the node to the block in current_ir_block.
3924  *
3925  * @param arg       A node producing a tuple.
3926  * @param max_proj  The end  position of the value in the tuple.
3927  */
3928 ir_node *new_defaultProj (ir_node *arg, long max_proj);
3929
3930 /** Constructor for a Tuple node.
3931  *
3932  * This is an auxiliary node to replace a node that returns a tuple
3933  * without changing the corresponding Proj nodes.
3934  * Adds the node to the block in current_ir_block.
3935  *
3936  * @param arity   The number of tuple elements.
3937  * @param **in    An array containing pointers to the nodes producing the tuple elements.
3938  */
3939 ir_node *new_Tuple  (int arity, ir_node *in[]);
3940
3941 /** Constructor for an Id node.
3942  *
3943  * This is an auxiliary node to replace a node that returns a single
3944  * value. Adds the node to the block in current_ir_block.
3945  *
3946  * @param *val    The operand to Id.
3947  * @param *mode   The mode of *val.
3948  */
3949 ir_node *new_Id     (ir_node *val, ir_mode *mode);
3950
3951 /** Constructor for a Bad node.
3952  *
3953  * Returns the unique Bad node of the graph.  The same as
3954  * get_irg_bad().
3955  */
3956 ir_node *new_Bad    (void);
3957
3958 /** Constructor for a Confirm node.
3959  *
3960  * Specifies constraints for a value.  To support dataflow analyses.
3961  * Adds the node to the block in current_ir_block.
3962  *
3963  * Example: If the value never exceeds '100' this is expressed by placing a
3964  * Confirm node val = new_d_Confirm(db, val, 100, '<') on the dataflow edge.
3965  *
3966  * @param *val    The value we express a constraint for
3967  * @param *bound  The value to compare against. Must be a firm node, typically a constant.
3968  * @param cmp     The compare operation.
3969  */
3970 ir_node *new_Confirm (ir_node *val, ir_node *bound, pn_Cmp cmp);
3971
3972 /** Constructor for an Unknown node.
3973  *
3974  * Represents an arbitrary value.  Places the node in
3975  * the start block.
3976  *
3977  * @param *m      The mode of the unknown value.
3978  */
3979 ir_node *new_Unknown(ir_mode *m);
3980
3981 /** Constructor for a NoMem node.
3982  *
3983  * Returns the unique NoMem node of the graph.  The same as
3984  * get_irg_no_mem().
3985  */
3986 ir_node *new_NoMem  (void);
3987
3988 /** Constructor for a Mux node.
3989  *
3990  * Adds the node to the block in current_ir_block.
3991  *
3992  * @param *sel      The ir_node that calculates the boolean select.
3993  * @param *ir_true  The ir_node that calculates the true result.
3994  * @param *ir_false The ir_node that calculates the false result.
3995  * @param *mode     The mode of the node (and it_true and ir_false).
3996  */
3997 ir_node *new_Mux  (ir_node *sel, ir_node *ir_false, ir_node *ir_true, ir_mode *mode);
3998
3999 /** Constructor for a CopyB node.
4000  *
4001  * Adds the node to the block in current_ir_block.
4002  *
4003  * @param *store      The current memory
4004  * @param *dst        The ir_node that represents the destination address.
4005  * @param *src        The ir_node that represents the source address.
4006  * @param *data_type  The type of the copied data
4007  */
4008 ir_node *new_CopyB(ir_node *store, ir_node *dst, ir_node *src, ir_type *data_type);
4009
4010 /** Constructor for a InstOf node.
4011  *
4012  * A High-Level Type check.
4013  *
4014  * @param   *store     The memory in which the object the entity should be selected
4015  *                     from is allocated.
4016  * @param   *objptr    A pointer to a object of a class type.
4017  * @param   *type      The type of which objptr must be.
4018  */
4019 ir_node *new_InstOf (ir_node *store, ir_node *objptr, ir_type *type);
4020
4021 /**Constructor for a Raise node.
4022  *
4023  * A High-Level Exception throw.
4024  *
4025  * @param *store The current memory.
4026  * @param *obj   A pointer to the Except variable.
4027  */
4028 ir_node *new_Raise  (ir_node *store, ir_node *obj);
4029
4030 /** Constructor for a Bound node.
4031  *
4032  * A High-Level bounds check. Checks whether lower <= idx && idx < upper.
4033  *
4034  * Adds the node to the block in current_ir_block.
4035  *
4036  * @param *store      The current memory
4037  * @param *idx        The ir_node that represents an index.
4038  * @param *lower      The ir_node that represents the lower bound for the index.
4039  * @param *upper      The ir_node that represents the upper bound for the index.
4040  */
4041 ir_node *new_Bound(ir_node *store, ir_node *idx, ir_node *lower, ir_node *upper);
4042
4043 /*---------------------------------------------------------------------*/
4044 /* The comfortable interface.                                          */
4045 /* Supports automatic Phi node construction.                           */
4046 /* All routines of the block oriented interface except new_Block are   */
4047 /* needed also.                                                        */
4048 /*---------------------------------------------------------------------*/
4049
4050 /** Create an immature block.
4051  *
4052  * An immature block has an unknown number of predecessors.  Predecessors
4053  * can be added with add_immBlock_pred().  Once all predecessors are
4054  * added the block must be matured.
4055  *
4056  * Adds the block to the graph in current_ir_graph. Does set
4057  * current_block.  Can be used with automatic Phi node construction.
4058  * This constructor can only be used if the graph is in
4059  * state_building.
4060  */
4061 ir_node *new_d_immBlock (dbg_info *db);
4062 ir_node *new_immBlock (void);
4063
4064 /** Add a control flow edge to an immature block. */
4065 void add_immBlock_pred (ir_node *immblock, ir_node *jmp);
4066
4067 /** Finalize a Block node, when all control flows are known. */
4068 void mature_immBlock (ir_node *block);
4069 #define mature_cur_block() mature_immBlock(get_cur_block());
4070
4071
4072 /** Get the current value of a local variable.
4073  *
4074  * Use this function to obtain the last definition of the local variable
4075  * associated with pos.  Pos may not exceed the value passed as n_loc
4076  * to new_ir_graph.  This call automatically inserts Phi nodes.
4077  *
4078  * @param *db    A pointer for debug information.
4079  * @param  pos   The position/id of the local variable.
4080  * @param *mode  The mode of the value to get.
4081  */
4082 ir_node *get_d_value (dbg_info *db, int pos, ir_mode *mode);
4083 ir_node *get_value (int pos, ir_mode *mode);
4084
4085 /** Remark a new definition of a variable.
4086  *
4087  * Use this function to remember a new definition of the value
4088  * associated with pos. Pos may not exceed the value passed as n_loc
4089  * to new_ir_graph.  This call is needed to automatically inserts Phi
4090  * nodes.
4091  *
4092  * @param  pos   The position/id of the local variable.
4093  * @param *value The new value written to the local variable.
4094  */
4095 void set_value (int pos, ir_node *value);
4096
4097 /** Get the current memory state.
4098  *
4099  * Use this function to obtain the last definition of the memory
4100  * state.  This call automatically inserts Phi nodes for the memory
4101  * state value.
4102  */
4103 ir_node *get_store (void);
4104
4105 /** Remark a new definition of the memory state.
4106  *
4107  * Use this function to remember a new definition of the memory state.
4108  * This call is needed to automatically inserts Phi nodes.
4109  *
4110  * @param *store The new memory state.
4111  */
4112 void set_store (ir_node *store);
4113
4114 /** keep this node alive even if End is not control-reachable from it
4115  *
4116  * @param ka The node to keep alive.
4117  */
4118 void keep_alive (ir_node *ka);
4119
4120 /** Returns the frame type of the current graph */
4121 ir_type *get_cur_frame_type(void);
4122
4123
4124 /* --- initialize and finalize ir construction --- */
4125
4126 /** Puts the graph into state "phase_high" */
4127 void irg_finalize_cons (ir_graph *irg);
4128
4129 /** Puts the program and all graphs into state phase_high.
4130  *
4131  * This also remarks, the construction of types is finished,
4132  * e.g., that no more subtypes will be added.  */
4133 void irp_finalize_cons(void);
4134
4135 /* --- Initialization --- */
4136
4137 /**
4138  * This function is called, whenever a local variable is used before definition
4139  *
4140  * @param irg       the IR graph on which this happens
4141  * @param mode      the mode of the local var
4142  * @param pos       position chosen be the frontend for this variable (n_loc)
4143  *
4144  * @return a firm node of mode @p mode that initializes the var at position pos
4145  *
4146  * @note
4147  *      Do not return NULL!
4148  *      If this function is not set, FIRM will create a const node with tarval BAD.
4149  *      Use set_irg_loc_description()/get_irg_loc_description() to assign additional
4150  *      informations to local variables.
4151  */
4152 typedef ir_node *uninitialized_local_variable_func_t(ir_graph *irg, ir_mode *mode, int pos);
4153
4154 #endif /* _IRCONS_H_ */