renamed all type * to ir_type *
[libfirm] / ir / ir / irnode_t.h
1 /*
2  * Project:     libFIRM
3  * File name:   ir/ir/irnode_t.h
4  * Purpose:     Representation of an intermediate operation -- private header.
5  * Author:      Martin Trapp, Christian Schaefer
6  * Modified by: Goetz Lindenmaier
7  * Created:
8  * CVS-ID:      $Id$
9  * Copyright:   (c) 1998-2003 Universität Karlsruhe
10  * Licence:     This file protected by GPL -  GNU GENERAL PUBLIC LICENSE.
11  */
12
13 /**
14  * @file irnode_t.h
15  *
16  * Declarations of an ir node.
17  *
18  * @author Martin Trapp, Christian Schaefer
19  */
20
21 # ifndef _IRNODE_T_H_
22 # define _IRNODE_T_H_
23
24 #include "firm_config.h"
25 #include "irnode.h"
26 #include "irop_t.h"
27 #include "irgraph_t.h"
28 #include "irflag_t.h"
29 #include "firm_common_t.h"
30 #include "irdom_t.h" /* For size of struct dom_info. */
31 #include "dbginfo.h"
32 #include "irloop.h"
33 #include "array.h"
34
35 #include "set.h"
36 #include "list.h"
37 #include "entity_t.h"
38 #include "type_t.h"
39 #include "tv_t.h"
40 #include "irextbb_t.h"
41
42
43 /** ir node attributes **/
44
45 /** Block attributes */
46 typedef struct {
47   /* General attributes */
48   ir_graph *irg;
49   unsigned long block_visited;  /**< for the walker that walks over all blocks. */
50   /* Attributes private to construction: */
51   unsigned matured:1;         /**< if set, all in-nodes of the block are fixed */
52   unsigned dead:1;            /**< if set, the block is dead (and could be replace by a Bad */
53   struct ir_node **graph_arr; /**< array to store all parameters */
54   /* Attributes holding analyses information */
55   struct dom_info dom;        /**< Datastructure that holds information about dominators.
56                  @@@ @todo
57                  Eventually overlay with graph_arr as only valid
58                  in different phases.  Eventually inline the whole
59                  datastructure. */
60   /*   exc_t exc;  */            /**< role of this block for exception handling */
61   /*   ir_node *handler_entry; */    /**< handler entry block iff this block is part of a region */
62   ir_node ** in_cg;           /**< array with predecessors in
63                    * interprocedural_view, if they differ
64                    * from intraprocedural predecessors */
65   int *backedge;              /**< Field n set to true if pred n is backedge.
66                      @@@ @todo Ev. replace by bitfield! */
67   int *cg_backedge;           /**< Field n set to true if pred n is interprocedural backedge.
68                      @@@ @todo Ev. replace by bitfield! */
69   ir_extblk *extblk;          /**< the extended basic block this block belongs to */
70
71   struct list_head succ_head; /**< A list head for all successor edges of a block. */
72
73 } block_attr;
74
75 /** Start attributes */
76 typedef struct {
77   char dummy;
78   /*   ir_graph *irg;   @@@ now in block */
79 } start_attr;
80
81 /** Cond attributes */
82 typedef struct {
83   cond_kind kind;           /**< flavor of Cond */
84   long default_proj;        /**< only for non-binary Conds: biggest Proj number, i.e. the one used for default. */
85   cond_jmp_predicate pred;  /**< only for binary Conds: The jump predication. */
86 } cond_attr;
87
88 /** Const attributes */
89 typedef struct {
90   tarval  *tv;       /**< the target value */
91   ir_type *tp;       /**< the source type, for analyses. default: type_unknown. */
92 } const_attr;
93
94 typedef struct {
95   symconst_symbol sym;  // old tori
96   symconst_kind num;
97   ir_type *tp;       /**< the source type, for analyses. default: type_unknown. */
98 } symconst_attr;
99
100 /** Sel attributes */
101 typedef struct {
102   entity *ent;          /**< entity to select */
103 } sel_attr;
104
105 /** Exception attributes */
106 typedef struct {
107   op_pin_state   pin_state;     /**< the pin state for operations that might generate a exception:
108                                      If it's know that no exception will be generated, could be set to
109                                      op_pin_state_floats. */
110 #if PRECISE_EXC_CONTEXT
111   struct ir_node **frag_arr;    /**< For Phi node construction in case of exception */
112 #endif
113 } except_attr;
114
115 typedef struct {
116   except_attr    exc;           /**< the exception attribute. MUST be the first one. */
117   ir_type *cld_tp;              /**< type of called procedure */
118   entity ** callee_arr;         /**< result of callee analysis */
119 } call_attr;
120
121 /** Alloc attributes */
122 typedef struct {
123   except_attr    exc;           /**< the exception attribute. MUST be the first one. */
124   ir_type *type;                /**< Type of the allocated object.  */
125   where_alloc where;            /**< stack, heap or other managed part of memory */
126 } alloc_attr;
127
128 /** Free attributes */
129 typedef struct {
130   ir_type *type;                /**< Type of the allocated object.  */
131   where_alloc where;            /**< stack, heap or other managed part of memory */
132 } free_attr;
133
134 /** InstOf attributes */
135 typedef struct
136 {
137   ir_type *ent;
138   int dfn;
139 } io_attr;
140
141 /** Filter attributes */
142 typedef struct {
143   long proj;                 /**< contains the result position to project (Proj) */
144   ir_node ** in_cg;          /**< array with interprocedural predecessors (Phi) */
145   int *backedge;              /**< Field n set to true if pred n is backedge.
146                      @todo Ev. replace by bitfield! */
147 } filter_attr;
148
149 /** EndReg/EndExcept attributes */
150 typedef struct {
151   char dummy;
152 } end_attr;
153
154 /** CallBegin attributes */
155 typedef struct {
156   ir_node * call;               /**< associated Call-operation */
157 } callbegin_attr;
158
159 /** Cast attributes */
160 typedef struct {
161   ir_type *totype;              /**< type of the casted node */
162 } cast_attr;
163
164 /** Load attributes */
165 typedef struct {
166   except_attr    exc;           /**< the exception attribute. MUST be the first one. */
167   ir_mode        *load_mode;    /**< the mode of this Load operation */
168   ent_volatility volatility;      /**< the volatility of a Load/Store operation */
169 } load_attr;
170
171 /** Store attributes */
172 typedef struct {
173   except_attr    exc;           /**< the exception attribute. MUST be the first one. */
174   ent_volatility volatility;      /**< the volatility of a Store operation */
175 } store_attr;
176
177 typedef pn_Cmp confirm_attr;    /**< Attribute to hold compare operation */
178
179 typedef struct {
180   except_attr    exc;           /**< the exception attribute. MUST be the first one. */
181   ir_type        *data_type;    /**< type of the copied entity */
182 } copyb_attr;
183
184 /**
185  * Edge info to put into an irn.
186  */
187 typedef struct _irn_edge_info_t {
188   struct list_head outs_head;  /**< The list of all outs */
189   int out_count;               /**< number of outs in the list */
190 } irn_edge_info_t;
191
192
193 /** Some IR-nodes just have one attribute, these are stored here,
194    some have more. Their name is 'irnodename_attr' */
195 typedef union {
196   start_attr     start; /**< For Start */
197   block_attr     block; /**< For Block: Fields needed to construct it */
198   cond_attr      c;     /**< For Cond. */
199   const_attr     con;   /**< For Const: contains the value of the constant and a type */
200   symconst_attr  i;     /**< For SymConst. */
201   sel_attr       s;     /**< For Sel. */
202   call_attr      call;  /**< For Call: pointer to the type of the method to call */
203   callbegin_attr callbegin; /**< For CallBegin */
204   alloc_attr     a;    /**< For Alloc. */
205   free_attr      f;    /**< For Free. */
206   io_attr        io;    /**< For InstOf */
207   cast_attr      cast;  /**< For Cast. */
208   load_attr      load;  /**< For Load. */
209   store_attr     store;  /**< For Store. */
210   int            phi0_pos;  /**< For Phi. Used to remember the value defined by
211                    this Phi node.  Needed when the Phi is completed
212                    to call get_r_internal_value to find the
213                    predecessors. If this attribute is set, the Phi
214                    node takes the role of the obsolete Phi0 node,
215                    therefore the name. */
216   int *phi_backedge;    /**< For Phi after construction.
217                            Field n set to true if pred n is backedge.
218                            @todo Ev. replace by bitfield! */
219   long           proj;          /**< For Proj: contains the result position to project */
220   confirm_attr   confirm_cmp;   /**< For Confirm: compare operation */
221   filter_attr    filter;        /**< For Filter */
222   end_attr       end;           /**< For EndReg, EndExcept */
223   except_attr    except;        /**< For Phi node construction in case of exceptions */
224   copyb_attr     copyb;         /**< For CopyB operation */
225 } attr;
226
227
228 /** common structure of an irnode
229     if the node has some attributes, they are stored in attr */
230 struct ir_node {
231   /* ------- Basics of the representation  ------- */
232   firm_kind kind;          /**< distinguishes this node from others */
233   ir_op *op;               /**< Opcode of this node. */
234   ir_mode *mode;           /**< Mode of this node. */
235   unsigned long visited;   /**< visited counter for walks of the graph */
236   struct ir_node **in;     /**< array with predecessors / operands */
237   void *link;              /**< to attach additional information to the node, e.g.
238                               used while construction to link Phi0 nodes and
239                               during optimization to link to nodes that
240                               shall replace a node. */
241   /* ------- Fields for optimizations / analysis information ------- */
242   struct ir_node **out;    /**< @deprecated array of out edges. */
243   struct dbg_info* dbi;    /**< A pointer to information for debug support. */
244   /* ------- For debugging ------- */
245 #ifdef DEBUG_libfirm
246         int out_valid;
247   int node_nr;             /**< a unique node number for each node to make output
248                               readable. */
249 #endif
250   /* ------- For analyses -------- */
251   ir_loop *loop;           /**< the loop the node is in. Access routines in irloop.h */
252 #ifdef  DO_HEAPANALYSIS
253   struct abstval *av;      /**< the abstract value of this node */
254   struct section *sec;
255 #endif
256 #if FIRM_EDGES_INPLACE
257   irn_edge_info_t edge_info;  /**< everlasting out edges */
258 #endif
259   /* ------- Opcode depending fields -------- */
260   attr attr;               /**< attribute of this node. Depends on opcode.
261                               Must be last field of struct ir_node. */
262 };
263
264
265 /** Returns the array with the ins.  The content of the array may not be
266    changed.  */
267 ir_node     **get_irn_in            (const ir_node *node);
268
269 /** @{ */
270 /** access attributes directly */
271 const_attr    get_irn_const_attr    (ir_node *node);
272 long          get_irn_proj_attr     (ir_node *node);
273 alloc_attr    get_irn_alloc_attr    (ir_node *node);
274 free_attr     get_irn_free_attr     (ir_node *node);
275 symconst_attr get_irn_symconst_attr (ir_node *node);
276 ir_type      *get_irn_call_attr     (ir_node *node);
277 ir_type      *get_irn_funccall_attr (ir_node *node);
278 sel_attr      get_irn_sel_attr      (ir_node *node);
279 int           get_irn_phi_attr      (ir_node *node);
280 block_attr    get_irn_block_attr    (ir_node *node);
281 load_attr     get_irn_load_attr     (ir_node *node);
282 store_attr    get_irn_store_attr    (ir_node *node);
283 except_attr   get_irn_except_attr   (ir_node *node);
284 /** @} */
285
286 /**
287  * The amount of additional space for custom data to be allocated upon creating a new node.
288  */
289 extern unsigned firm_add_node_size;
290
291 /**
292  * Sets the get_type operation for an ir_op_ops.
293  *
294  * @param code   the opcode for the default operation
295  * @param ops    the operations initialized
296  *
297  * @return
298  *    The operations.
299  */
300 ir_op_ops *firm_set_default_get_type(opcode code, ir_op_ops *ops);
301
302 /**
303  * Sets the get_type_attr operation for an ir_op_ops.
304  *
305  * @param code   the opcode for the default operation
306  * @param ops    the operations initialized
307  *
308  * @return
309  *    The operations.
310  */
311 ir_op_ops *firm_set_default_get_type_attr(opcode code, ir_op_ops *ops);
312
313 /**
314  * Sets the get_entity_attr operation for an ir_op_ops.
315  *
316  * @param code   the opcode for the default operation
317  * @param ops    the operations initialized
318  *
319  * @return
320  *    The operations.
321  */
322 ir_op_ops *firm_set_default_get_entity_attr(opcode code, ir_op_ops *ops);
323
324 /*-------------------------------------------------------------------*/
325 /*  These function are most used in libfirm.  Give them as static    */
326 /*  functions so they can be inlined.                                */
327 /*-------------------------------------------------------------------*/
328
329 /**
330  * Checks whether a pointer points to a ir node.
331  * Intern version for libFirm.
332  */
333 static INLINE int
334 _is_ir_node (const void *thing) {
335   return (get_kind(thing) == k_ir_node);
336 }
337
338 /**
339  * Gets the op of a node.
340  * Intern version for libFirm.
341  */
342 static INLINE ir_op *
343 _get_irn_op (const ir_node *node) {
344   assert (node);
345   return node->op;
346 }
347
348 /** Copies all attributes stored in the old node  to the new node.
349     Assumes both have the same opcode and sufficient size. */
350 static INLINE void
351 copy_node_attr(const ir_node *old_node, ir_node *new_node) {
352   ir_op *op = _get_irn_op(old_node);
353
354   /* must always exist */
355   op->ops.copy_attr(old_node, new_node);
356 }
357
358 /**
359  * Gets the opcode of a node.
360  * Intern version for libFirm.
361  */
362 static INLINE opcode
363 _get_irn_opcode (const ir_node *node) {
364   assert (k_ir_node == get_kind(node));
365   assert (node->op);
366   return node->op->code;
367 }
368
369 /**
370  * Returns the number of predecessors without the block predecessor.
371  * Intern version for libFirm.
372  */
373 static INLINE int
374 _get_irn_intra_arity (const ir_node *node) {
375   assert(node);
376   return ARR_LEN(node->in) - 1;
377 }
378
379 /**
380  * Returns the number of predecessors without the block predecessor.
381  * Intern version for libFirm.
382  */
383 static INLINE int
384 _get_irn_inter_arity (const ir_node *node) {
385   assert(node);
386   if (_get_irn_op(node) == op_Filter) {
387     assert(node->attr.filter.in_cg);
388     return ARR_LEN(node->attr.filter.in_cg) - 1;
389   } else if (_get_irn_op(node) == op_Block && node->attr.block.in_cg) {
390     return ARR_LEN(node->attr.block.in_cg) - 1;
391   }
392   return _get_irn_intra_arity(node);
393 }
394
395 /**
396  * Returns the number of predecessors without the block predecessor.
397  * Intern version for libFirm.
398  */
399 extern int (*_get_irn_arity)(const ir_node *node);
400
401 /**
402  * Intern version for libFirm.
403  */
404 static INLINE ir_node *
405 _get_irn_intra_n (const ir_node *node, int n) {
406   ir_node *nn;
407
408   assert(node); assert(-1 <= n && n < _get_irn_intra_arity(node));
409
410   nn = node->in[n + 1];
411   if (!nn || (nn->op != op_Id)) return nn;
412
413   return (node->in[n + 1] = skip_Id(nn));
414 }
415
416 /**
417  * Intern version for libFirm.
418  */
419 static INLINE ir_node*
420 _get_irn_inter_n (const ir_node *node, int n) {
421   assert(node); assert(-1 <= n && n < _get_irn_inter_arity(node));
422
423   /* handle Filter and Block specially */
424   if (_get_irn_op(node) == op_Filter) {
425     assert(node->attr.filter.in_cg);
426     return (node->attr.filter.in_cg[n + 1] = skip_Id(node->attr.filter.in_cg[n + 1]));
427   } else if (_get_irn_op(node) == op_Block && node->attr.block.in_cg) {
428     return (node->attr.block.in_cg[n + 1] = skip_Id(node->attr.block.in_cg[n + 1]));
429   }
430
431   return _get_irn_intra_n (node, n);
432 }
433
434 /**
435  * Access to the predecessors of a node.
436  * To iterate over the operands iterate from 0 to i < get_irn_arity(),
437  * to iterate including the Block predecessor iterate from i = -1 to
438  * i < get_irn_arity.
439  * If it is a block, the entry -1 is NULL.
440  * Intern version for libFirm.
441  */
442 extern ir_node *(*_get_irn_n)(const ir_node *node, int n);
443
444 /**
445  * Gets the mode of a node.
446  * Intern version for libFirm.
447  */
448 static INLINE ir_mode *
449 _get_irn_mode (const ir_node *node)
450 {
451   assert (node);
452   return node->mode;
453 }
454
455 /**
456  * Sets the mode of a node.
457  * Intern version of libFirm.
458  */
459 static INLINE void
460 _set_irn_mode (ir_node *node, ir_mode *mode)
461 {
462   assert (node);
463   node->mode = mode;
464 }
465
466 /**
467  * Gets the visited counter of a node.
468  * Intern version for libFirm.
469  */
470 static INLINE unsigned long
471 _get_irn_visited (const ir_node *node)
472 {
473   assert (node);
474   return node->visited;
475 }
476
477 /**
478  * Sets the visited counter of a node.
479  * Intern version for libFirm.
480  */
481 static INLINE void
482 _set_irn_visited (ir_node *node, unsigned long visited)
483 {
484   assert (node);
485   node->visited = visited;
486 }
487
488 /**
489  * Mark a node as visited in a graph.
490  * Intern version for libFirm.
491  */
492 static INLINE void
493 _mark_irn_visited (ir_node *node) {
494   assert (node);
495   node->visited = current_ir_graph->visited;
496 }
497
498 /**
499  * Returns non-zero if a node of was visited.
500  * Intern version for libFirm.
501  */
502 static INLINE int
503 _irn_visited(const ir_node *node) {
504   assert (node);
505   return (node->visited >= current_ir_graph->visited);
506 }
507
508 /**
509  * Returns non-zero if a node of was NOT visited.
510  * Intern version for libFirm.
511  */
512 static INLINE int
513 _irn_not_visited(const ir_node *node) {
514   assert (node);
515   return (node->visited < current_ir_graph->visited);
516 }
517
518 /**
519  * Sets the link of a node.
520  * Intern version of libFirm.
521  */
522 static INLINE void
523 _set_irn_link(ir_node *node, void *link) {
524   assert (node);
525   /* Link field is used for Phi construction and various optimizations
526      in iropt. */
527   assert(get_irg_phase_state(get_irn_irg(node)) != phase_building);
528
529   node->link = link;
530 }
531
532 /**
533  * Returns the link of a node.
534  * Intern version of libFirm.
535  */
536 static INLINE void *
537 _get_irn_link(const ir_node *node) {
538   assert (node && _is_ir_node(node));
539   return node->link;
540 }
541
542 /**
543  * Returns whether the node _always_ must be pinned.
544  * I.e., the node is not floating after global cse.
545  *
546  * Intern version of libFirm.
547  */
548 static INLINE op_pin_state
549 _get_irn_pinned(const ir_node *node) {
550   op_pin_state state;
551   assert(node && _is_ir_node(node));
552   /* Check opcode */
553   state = _get_op_pinned(_get_irn_op(node));
554
555   if (state >= op_pin_state_exc_pinned)
556     return get_opt_fragile_ops() ? node->attr.except.pin_state : op_pin_state_pinned;
557   return state;
558 }
559
560 static INLINE op_pin_state
561 _is_irn_pinned_in_irg(const ir_node *node) {
562   if (get_irg_pinned(get_irn_irg(node)) == op_pin_state_floats)
563     return get_irn_pinned(node);
564   return op_pin_state_pinned;
565 }
566
567 static INLINE int
568 _is_unop(const ir_node *node) {
569   assert(node && _is_ir_node(node));
570   return (node->op->opar == oparity_unary);
571 }
572
573 static INLINE int
574 _is_binop(const ir_node *node) {
575   assert(node && _is_ir_node(node));
576   return (node->op->opar == oparity_binary);
577 }
578
579 static INLINE int
580 _is_Bad(const ir_node *node) {
581   assert(node);
582   return (node && _get_irn_op(node) == op_Bad);
583 }
584
585 static INLINE int
586 _is_Const(const ir_node *node) {
587   assert(node);
588   return (node && _get_irn_op(node) == op_Const);
589 }
590
591 static INLINE int
592 _is_Unknown (const ir_node *node) {
593   assert(node);
594   return (node && _get_irn_op(node) == op_Unknown);
595 }
596
597 static INLINE int
598 _is_no_Block(const ir_node *node) {
599   assert(node && _is_ir_node(node));
600   return (_get_irn_op(node) != op_Block);
601 }
602
603 static INLINE int
604 _is_Block(const ir_node *node) {
605   assert(node && _is_ir_node(node));
606   return (_get_irn_op(node) == op_Block);
607 }
608
609 static INLINE int
610 _get_Block_n_cfgpreds (ir_node *node) {
611   assert(_is_Block(node));
612   return _get_irn_arity(node);
613 }
614
615 static INLINE ir_node *
616 _get_Block_cfgpred (ir_node *node, int pos) {
617   assert(0 <= pos && pos < get_irn_arity(node));
618   assert(_is_Block(node));
619   return _get_irn_n(node, pos);
620 }
621
622 /* Get the predecessor block.
623  *
624  *  Returns the block corresponding to the predecessor pos.
625  *
626  *  There are several ambiguities we resolve with this function:
627  *  - The direct predecessor can be a Proj, which is not pinned.
628  *    We walk from the predecessor to the next pinned node
629  *    (skip_Proj) and return the block that node is in.
630  *  - If we encounter the Bad node, this function does not return
631  *    Start, but the Bad node.
632  */
633 static INLINE ir_node  *
634 _get_Block_cfgpred_block(ir_node *node, int pos) {
635   ir_node *res = skip_Proj(get_Block_cfgpred(node, pos));
636   if (!is_Bad(res))
637     res = get_nodes_block(res);
638   return res;
639 }
640
641 static INLINE unsigned long
642 _get_Block_block_visited (ir_node *node) {
643   assert (node->op == op_Block);
644   return node->attr.block.block_visited;
645 }
646
647 static INLINE void
648 _set_Block_block_visited (ir_node *node, unsigned long visit) {
649   assert (node->op == op_Block);
650   node->attr.block.block_visited = visit;
651 }
652
653 /* For this current_ir_graph must be set. */
654 static INLINE void
655 _mark_Block_block_visited (ir_node *node) {
656   assert (node->op == op_Block);
657   node->attr.block.block_visited = get_irg_block_visited(current_ir_graph);
658 }
659
660 static INLINE int
661 _Block_not_block_visited(ir_node *node) {
662   assert (node->op == op_Block);
663   return (node->attr.block.block_visited < get_irg_block_visited(current_ir_graph));
664 }
665
666 static INLINE ir_node *
667 _set_Block_dead(ir_node *block) {
668   assert(_get_irn_op(block) == op_Block);
669   block->attr.block.dead = 1;
670   return block;
671 }
672
673 static INLINE int
674 _is_Block_dead(const ir_node *block) {
675   ir_op * op = _get_irn_op(block);
676
677   if (op == op_Bad)
678     return 1;
679   else {
680     assert(op == op_Block);
681     return block->attr.block.dead;
682   }
683 }
684
685 static INLINE tarval *_get_Const_tarval (ir_node *node) {
686   assert (_get_irn_op(node) == op_Const);
687   return node->attr.con.tv;
688 }
689
690 static INLINE cnst_classify_t _classify_Const(ir_node *node) {
691   ir_op *op;
692   assert(_is_ir_node(node));
693
694   op = _get_irn_op(node);
695
696   if(op == op_Const)
697     return classify_tarval(_get_Const_tarval(node));
698   else if(op == op_SymConst)
699     return CNST_SYMCONST;
700
701   return CNST_NO_CONST;
702 }
703
704 static INLINE int _is_irn_forking(const ir_node *node) {
705   return is_op_forking(_get_irn_op(node));
706 }
707
708 static INLINE ir_type *_get_irn_type(ir_node *node) {
709   return _get_irn_op(node)->ops.get_type(node);
710 }
711
712 static INLINE ir_type *get_irn_type_attr(ir_node *node) {
713   return _get_irn_op(node)->ops.get_type_attr(node);
714 }
715
716 static INLINE entity *get_irn_entity_attr(ir_node *node) {
717   return _get_irn_op(node)->ops.get_entity_attr(node);
718 }
719
720 static INLINE int _is_irn_constlike(const ir_node *node) {
721   return is_op_constlike(_get_irn_op(node));
722 }
723
724 static INLINE cond_jmp_predicate _get_Cond_jmp_pred(ir_node *node) {
725   assert (_get_irn_op(node) == op_Cond);
726   return node->attr.c.pred;
727 }
728
729 static INLINE void _set_Cond_jmp_pred(ir_node *node, cond_jmp_predicate pred) {
730   assert (_get_irn_op(node) == op_Cond);
731   node->attr.c.pred = pred;
732 }
733
734 /* this section MUST contain all inline functions */
735 #define is_ir_node(thing)                     _is_ir_node(thing)
736 #define get_irn_intra_arity(node)             _get_irn_intra_arity(node)
737 #define get_irn_inter_arity(node)             _get_irn_inter_arity(node)
738 #define get_irn_arity(node)                   _get_irn_arity(node)
739 #define get_irn_intra_n(node, n)              _get_irn_intra_n(node, n)
740 #define get_irn_inter_n(node, n)              _get_irn_inter_n(node, n)
741 #define get_irn_n(node, n)                    _get_irn_n(node, n)
742 #define get_irn_mode(node)                    _get_irn_mode(node)
743 #define set_irn_mode(node, mode)              _set_irn_mode(node, mode)
744 #define get_irn_op(node)                      _get_irn_op(node)
745 #define get_irn_opcode(node)                  _get_irn_opcode(node)
746 #define get_irn_visited(node)                 _get_irn_visited(node)
747 #define set_irn_visited(node, v)              _set_irn_visited(node, v)
748 #define mark_irn_visited(node)                _mark_irn_visited(node)
749 #define irn_visited(node)                     _irn_visited(node)
750 #define irn_not_visited(node)                 _irn_not_visited(node)
751 #define set_irn_link(node, link)              _set_irn_link(node, link)
752 #define get_irn_link(node)                    _get_irn_link(node)
753 #define get_irn_pinned(node)                  _get_irn_pinned(node)
754 #define is_irn_pinned_in_irg(node)            _is_irn_pinned_in_irg(node)
755 #define is_unop(node)                         _is_unop(node)
756 #define is_binop(node)                        _is_binop(node)
757 #define is_Const(node)                        _is_Const(node)
758 #define is_Unknown(node)                      _is_Unknown(node)
759 #define is_Bad(node)                          _is_Bad(node)
760 #define is_no_Block(node)                     _is_no_Block(node)
761 #define is_Block(node)                        _is_Block(node)
762 #define get_Block_n_cfgpreds(node)            _get_Block_n_cfgpreds(node)
763 #define get_Block_cfgpred(node, pos)          _get_Block_cfgpred(node, pos)
764 #define get_Block_cfgpred_block(node, pos)    _get_Block_cfgpred_block(node, pos)
765 #define get_Block_block_visited(node)         _get_Block_block_visited(node)
766 #define set_Block_block_visited(node, visit)  _set_Block_block_visited(node, visit)
767 #define mark_Block_block_visited(node)        _mark_Block_block_visited(node)
768 #define Block_not_block_visited(node)         _Block_not_block_visited(node)
769 #define set_Block_dead(block)                 _set_Block_dead(block)
770 #define is_Block_dead(block)                  _is_Block_dead(block)
771 #define get_Const_tarval(node)                _get_Const_tarval(node)
772 #define classify_Const(node)                  _classify_Const(node)
773 #define is_irn_forking(node)                  _is_irn_forking(node)
774 #define get_irn_type(node)                    _get_irn_type(node)
775 #define is_irn_constlike(node)                _is_irn_constlike(node)
776 #define get_Cond_jmp_pred(node)               _get_Cond_jmp_pred(node)
777 #define set_Cond_jmp_pred(node, pred)         _set_Cond_jmp_pred(node, pred)
778
779 # endif /* _IRNODE_T_H_ */