ed1f73132d9fa4d56a4e26d52fb8bc789b9fad36
[libfirm] / ir / ir / irnode_t.h
1 /*
2  * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
3  *
4  * This file is part of libFirm.
5  *
6  * This file may be distributed and/or modified under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation and appearing in the file LICENSE.GPL included in the
9  * packaging of this file.
10  *
11  * Licensees holding valid libFirm Professional Edition licenses may use
12  * this file in accordance with the libFirm Commercial License.
13  * Agreement provided with the Software.
14  *
15  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE.
18  */
19
20 /**
21  * @file
22  * @brief   Representation of an intermediate operation -- private header.
23  * @author  Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
24  * @version $Id$
25  */
26 #ifndef FIRM_IR_IRNODE_T_H
27 #define FIRM_IR_IRNODE_T_H
28
29 #include "irtypes.h"
30 #include "irnode.h"
31 #include "irop_t.h"
32 #include "irgraph_t.h"
33 #include "irflag_t.h"
34 #include "array.h"
35
36 /**
37  * Returns the array with the ins.  The content of the array may not be
38  * changed.
39  * Note that this function returns the whole in array including the
40  * block predecessor. So, it is NOT symmetric with set_irn_in().
41  */
42 ir_node     **get_irn_in            (const ir_node *node);
43
44 /** @{ */
45 /** access attributes directly */
46 const_attr    *get_irn_const_attr    (ir_node *node);
47 long          get_irn_proj_attr      (ir_node *node);
48 alloc_attr    *get_irn_alloc_attr    (ir_node *node);
49 free_attr     *get_irn_free_attr     (ir_node *node);
50 symconst_attr *get_irn_symconst_attr (ir_node *node);
51 call_attr     *get_irn_call_attr     (ir_node *node);
52 sel_attr      *get_irn_sel_attr      (ir_node *node);
53 phi_attr      *get_irn_phi_attr      (ir_node *node);
54 block_attr    *get_irn_block_attr    (ir_node *node);
55 load_attr     *get_irn_load_attr     (ir_node *node);
56 store_attr    *get_irn_store_attr    (ir_node *node);
57 except_attr   *get_irn_except_attr   (ir_node *node);
58 divmod_attr   *get_irn_divmod_attr   (ir_node *node);
59 builtin_attr  *get_irn_builtin_attr  (ir_node *node);
60 /** @} */
61
62 /**
63  * The amount of additional space for custom data to be allocated upon creating a new node.
64  */
65 extern unsigned firm_add_node_size;
66
67 /**
68  * Sets the get_type operation for an ir_op_ops.
69  *
70  * @param code   the opcode for the default operation
71  * @param ops    the operations initialized
72  *
73  * @return
74  *    The operations.
75  */
76 ir_op_ops *firm_set_default_get_type(ir_opcode code, ir_op_ops *ops);
77
78 /**
79  * Sets the get_type_attr operation for an ir_op_ops.
80  *
81  * @param code   the opcode for the default operation
82  * @param ops    the operations initialized
83  *
84  * @return
85  *    The operations.
86  */
87 ir_op_ops *firm_set_default_get_type_attr(ir_opcode code, ir_op_ops *ops);
88
89 /**
90  * Sets the get_entity_attr operation for an ir_op_ops.
91  *
92  * @param code   the opcode for the default operation
93  * @param ops    the operations initialized
94  *
95  * @return
96  *    The operations.
97  */
98 ir_op_ops *firm_set_default_get_entity_attr(ir_opcode code, ir_op_ops *ops);
99
100 /**
101  * Returns an array with the predecessors of the Block. Depending on
102  * the implementation of the graph data structure this can be a copy of
103  * the internal representation of predecessors as well as the internal
104  * array itself. Therefore writing to this array might obstruct the IR.
105  */
106 ir_node **get_Block_cfgpred_arr(ir_node *node);
107
108 /*-------------------------------------------------------------------*/
109 /*  These function are most used in libfirm.  Give them as static    */
110 /*  functions so they can be inlined.                                */
111 /*-------------------------------------------------------------------*/
112
113 /**
114  * Checks whether a pointer points to a ir node.
115  * Intern version for libFirm.
116  */
117 static inline int _is_ir_node(const void *thing)
118 {
119         return (get_kind(thing) == k_ir_node);
120 }
121
122 /**
123  * Gets the op of a node.
124  * Intern version for libFirm.
125  */
126 static inline ir_op *_get_irn_op(const ir_node *node)
127 {
128         assert(node);
129         return node->op;
130 }
131
132 static inline void _set_irn_op(ir_node *node, ir_op *op)
133 {
134         assert(node);
135         node->op = op;
136 }
137
138 /** Copies all attributes stored in the old node  to the new node.
139     Assumes both have the same opcode and sufficient size. */
140 static inline void _copy_node_attr(ir_graph *irg, const ir_node *old_node,
141                                    ir_node *new_node)
142 {
143         ir_op *op = _get_irn_op(old_node);
144
145         /* must always exist */
146         op->ops.copy_attr(irg, old_node, new_node);
147 }
148
149 /**
150  * Gets the opcode of a node.
151  * Intern version for libFirm.
152  */
153 static inline unsigned _get_irn_opcode(const ir_node *node)
154 {
155         assert(k_ir_node == get_kind(node));
156         assert(node->op);
157         return node->op->code;
158 }
159
160 /**
161  * Returns the number of predecessors without the block predecessor.
162  * Intern version for libFirm.
163  */
164 static inline int _get_irn_intra_arity(const ir_node *node)
165 {
166         assert(node);
167         return ARR_LEN(node->in) - 1;
168 }
169
170 /**
171  * Returns the number of predecessors without the block predecessor.
172  * Intern version for libFirm.
173  */
174 static inline int _get_irn_inter_arity(const ir_node *node)
175 {
176         assert(node);
177         if (_get_irn_op(node) == op_Filter) {
178                 assert(node->attr.filter.in_cg);
179                 return ARR_LEN(node->attr.filter.in_cg) - 1;
180         } else if (_get_irn_op(node) == op_Block && node->attr.block.in_cg) {
181                 return ARR_LEN(node->attr.block.in_cg) - 1;
182         }
183         return _get_irn_intra_arity(node);
184 }
185
186 #ifdef INTERPROCEDURAL_VIEW
187 /**
188  * Returns the number of predecessors without the block predecessor.
189  * Intern version for libFirm.
190  */
191 extern int (*_get_irn_arity)(const ir_node *node);
192
193 #else
194
195 #define _get_irn_arity(n) _get_irn_intra_arity(n)
196 #endif
197
198 /**
199  * Intern version for libFirm.
200  */
201 static inline ir_node *_get_irn_intra_n(const ir_node *node, int n)
202 {
203         ir_node *nn;
204
205         assert(node);
206         assert(-1 <= n && n < _get_irn_intra_arity(node));
207
208         nn = node->in[n + 1];
209         if (nn == NULL) {
210                 /* only block and Anchor inputs are allowed to be NULL */
211                 assert((node->op == op_Anchor || n == -1) && "NULL input of a node");
212                 return NULL;
213         }
214         if (nn->op != op_Id) return nn;
215
216         return (node->in[n + 1] = skip_Id(nn));
217 }
218
219 /**
220  * Intern version for libFirm.
221  */
222 static inline ir_node *_get_irn_inter_n(const ir_node *node, int n)
223 {
224         assert(node); assert(-1 <= n && n < _get_irn_inter_arity(node));
225
226         /* handle Filter and Block specially */
227         if (_get_irn_op(node) == op_Filter) {
228                 assert(node->attr.filter.in_cg);
229                 return (node->attr.filter.in_cg[n + 1] = skip_Id(node->attr.filter.in_cg[n + 1]));
230         } else if (_get_irn_op(node) == op_Block && node->attr.block.in_cg) {
231                 return (node->attr.block.in_cg[n + 1] = skip_Id(node->attr.block.in_cg[n + 1]));
232         }
233
234         return _get_irn_intra_n(node, n);
235 }
236
237 /**
238  * returns a hash value for a node
239  */
240 static inline unsigned hash_irn(const ir_node *node)
241 {
242         return (unsigned) get_irn_idx(node);
243 }
244
245 /**
246  * Access to the predecessors of a node.
247  * To iterate over the operands iterate from 0 to i < get_irn_arity(),
248  * to iterate including the Block predecessor iterate from i = -1 to
249  * i < get_irn_arity.
250  * If it is a block, the entry -1 is NULL.
251  * Intern version for libFirm.
252  */
253 #ifdef INTERPROCEDURAL_VIEW
254 extern ir_node *(*_get_irn_n)(const ir_node *node, int n);
255 #else
256 #define _get_irn_n(n,i) _get_irn_intra_n(n,i)
257 #endif
258
259 static inline int _get_irn_deps(const ir_node *node) {
260         return node->deps ? ARR_LEN(node->deps) : 0;
261 }
262
263 static inline ir_node *_get_irn_dep(const ir_node *node, int pos) {
264         assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
265         assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range");
266         return node->deps[pos];
267 }
268
269 static inline void _set_irn_dep(ir_node *node, int pos, ir_node *dep)
270 {
271         ir_node *old;
272
273         assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
274         assert(pos >= 0 && pos < ARR_LEN(node->deps) && "dependency index out of range");
275         old = node->deps[pos];
276         node->deps[pos] = dep;
277         edges_notify_edge_kind(node, pos, dep, old, EDGE_KIND_DEP, get_irn_irg(node));
278 }
279
280
281 static inline int _get_irn_ins_or_deps(const ir_node *irn)
282 {
283         return _get_irn_deps(irn) + _get_irn_arity(irn);
284 }
285
286 static inline ir_node *_get_irn_in_or_dep(const ir_node *irn, int pos)
287 {
288         int n_in = get_irn_arity(irn);
289         return pos < n_in ? get_irn_n(irn, pos) : get_irn_dep(irn, pos - n_in);
290 }
291
292 /**
293  * Gets the mode of a node.
294  * Intern version for libFirm.
295  */
296 static inline ir_mode *_get_irn_mode(const ir_node *node)
297 {
298         assert(node);
299         return node->mode;
300 }
301
302 /**
303  * Sets the mode of a node.
304  * Intern version of libFirm.
305  */
306 static inline void _set_irn_mode(ir_node *node, ir_mode *mode)
307 {
308         assert(node);
309         node->mode = mode;
310 }
311
312 static inline ir_graph *_get_irn_irg(const ir_node *node)
313 {
314         /*
315          * Do not use get_nodes_Block() here, because this
316          * will check the pinned state.
317          * However even a 'wrong' block is always in the proper
318          * irg.
319          */
320         if (! is_Block(node))
321                 node = get_irn_n(node, -1);
322         /* note that get_Block_irg() can handle Bad nodes */
323         return get_Block_irg(node);
324 }
325
326 /**
327  * Gets the visited counter of a node.
328  * Intern version for libFirm.
329  */
330 static inline ir_visited_t _get_irn_visited(const ir_node *node)
331 {
332         assert(node);
333         return node->visited;
334 }
335
336 /**
337  * Sets the visited counter of a node.
338  * Intern version for libFirm.
339  */
340 static inline void _set_irn_visited(ir_node *node, ir_visited_t visited)
341 {
342         assert(node);
343         node->visited = visited;
344 }
345
346 /**
347  * Mark a node as visited in a graph.
348  * Intern version for libFirm.
349  */
350 static inline void _mark_irn_visited(ir_node *node)
351 {
352         node->visited = get_irn_irg(node)->visited;
353 }
354
355 /**
356  * Returns non-zero if a node of was visited.
357  * Intern version for libFirm.
358  */
359 static inline int _irn_visited(const ir_node *node)
360 {
361         ir_graph *irg = get_irn_irg(node);
362         return node->visited >= irg->visited;
363 }
364
365 static inline int _irn_visited_else_mark(ir_node *node)
366 {
367         if (_irn_visited(node))
368                 return 1;
369         _mark_irn_visited(node);
370         return 0;
371 }
372
373 /**
374  * Sets the link of a node.
375  * Intern version of libFirm.
376  */
377 static inline void _set_irn_link(ir_node *node, void *link)
378 {
379         assert(node);
380         node->link = link;
381 }
382
383 /**
384  * Returns the link of a node.
385  * Intern version of libFirm.
386  */
387 static inline void *_get_irn_link(const ir_node *node)
388 {
389         assert(node && _is_ir_node(node));
390         return node->link;
391 }
392
393 /**
394  * Returns whether the node _always_ must be pinned.
395  * I.e., the node is not floating after global cse.
396  *
397  * Intern version of libFirm.
398  */
399 static inline op_pin_state _get_irn_pinned(const ir_node *node)
400 {
401         op_pin_state state;
402         assert(node && _is_ir_node(node));
403         /* Check opcode */
404         state = _get_op_pinned(_get_irn_op(node));
405
406         if (state >= op_pin_state_exc_pinned)
407                 return get_opt_fragile_ops() ? node->attr.except.pin_state : op_pin_state_pinned;
408         return state;
409 }
410
411 static inline op_pin_state _is_irn_pinned_in_irg(const ir_node *node)
412 {
413         if (get_irg_pinned(get_irn_irg(node)) == op_pin_state_floats)
414                 return get_irn_pinned(node);
415         return op_pin_state_pinned;
416 }
417
418 /* include generated code */
419 #include "gen_irnode.h"
420
421 static inline int _is_unop(const ir_node *node)
422 {
423         assert(node && _is_ir_node(node));
424         return (node->op->opar == oparity_unary);
425 }
426
427 static inline int _is_binop(const ir_node *node)
428 {
429         assert(node && _is_ir_node(node));
430         return (node->op->opar == oparity_binary);
431 }
432
433 static inline int _is_Phi(const ir_node *node)
434 {
435         ir_op *op;
436         assert(node);
437
438         op = get_irn_op(node);
439 #ifdef INTERPROCEDURAL_VIEW
440         if (op == op_Filter) return get_interprocedural_view();
441 #endif
442         return (op == op_Phi);
443 }
444
445 static inline int _is_Proj(const ir_node *node)
446 {
447         ir_op *op;
448         assert(node);
449
450         op = _get_irn_op(node);
451 #ifdef INTERPROCEDURAL_VIEW
452         if (op == op_Filter) return !get_interprocedural_view();
453 #endif
454         return (op == op_Proj);
455 }
456
457 static inline int _is_strictConv(const ir_node *node)
458 {
459         return _is_Conv(node) && get_Conv_strict(node);
460 }
461
462 static inline int _is_SymConst_addr_ent(const ir_node *node)
463 {
464         return is_SymConst(node) && get_SymConst_kind(node) == symconst_addr_ent;
465 }
466
467 static inline int _is_no_Block(const ir_node *node)
468 {
469         assert(node && _is_ir_node(node));
470         return (_get_irn_op(node) != op_Block);
471 }
472
473 static inline int _get_Block_n_cfgpreds(const ir_node *node)
474 {
475         assert(_is_Block(node));
476         return _get_irn_arity(node);
477 }
478
479 static inline ir_node *_get_Block_cfgpred(const ir_node *node, int pos)
480 {
481         assert(0 <= pos && pos < get_irn_arity(node));
482         assert(_is_Block(node));
483         return _get_irn_n(node, pos);
484 }
485
486 /* Get the predecessor block.
487  *
488  *  Returns the block corresponding to the predecessor pos.
489  *
490  *  There are several ambiguities we resolve with this function:
491  *  - The direct predecessor can be a Proj, which is not pinned.
492  *    We walk from the predecessor to the next pinned node
493  *    (skip_Proj) and return the block that node is in.
494  *  - If we encounter the Bad node, this function does not return
495  *    the Start block, but the Bad node.
496  */
497 static inline ir_node  *_get_Block_cfgpred_block(const ir_node *node, int pos)
498 {
499         ir_node *res = skip_Proj(get_Block_cfgpred(node, pos));
500         if (!is_Bad(res))
501                 res = get_nodes_block(res);
502         return res;
503 }
504
505 static inline ir_visited_t _get_Block_block_visited(const ir_node *node)
506 {
507         assert(node->op == op_Block);
508         return node->attr.block.block_visited;
509 }
510
511 static inline void _set_Block_block_visited(ir_node *node, ir_visited_t visit)
512 {
513         assert(node->op == op_Block);
514         node->attr.block.block_visited = visit;
515 }
516
517 /* For this current_ir_graph must be set. */
518 static inline void _mark_Block_block_visited(ir_node *node)
519 {
520         ir_graph *irg = get_Block_irg(node);
521         node->attr.block.block_visited = get_irg_block_visited(irg);
522 }
523
524 static inline int _Block_block_visited(const ir_node *node)
525 {
526         ir_graph *irg = get_Block_irg(node);
527         return node->attr.block.block_visited >= get_irg_block_visited(irg);
528 }
529
530 static inline ir_node *_set_Block_dead(ir_node *block)
531 {
532         assert(_get_irn_op(block) == op_Block);
533         block->attr.block.dom.dom_depth = -1;
534         block->attr.block.is_dead = 1;
535         return block;
536 }
537
538 static inline int _is_Block_dead(const ir_node *block)
539 {
540         ir_op *op = _get_irn_op(block);
541
542         if (op == op_Bad)
543                 return 1;
544         else {
545                 assert(op == op_Block);
546                 return block->attr.block.is_dead;
547         }
548 }
549
550 static inline ir_graph *_get_Block_irg(const ir_node *block)
551 {
552         assert(is_Block(block) || is_Bad(block));
553         return block->attr.irg.irg;
554 }
555
556 static inline tarval *_get_Const_tarval(const ir_node *node) {
557         assert(_get_irn_op(node) == op_Const);
558         return node->attr.con.tv;
559 }
560
561 static inline int _is_Const_null(const ir_node *node) {
562         return tarval_is_null(_get_Const_tarval(node));
563 }
564
565 static inline int _is_Const_one(const ir_node *node) {
566         return tarval_is_one(_get_Const_tarval(node));
567 }
568
569 static inline int _is_Const_all_one(const ir_node *node) {
570         return tarval_is_all_one(_get_Const_tarval(node));
571 }
572
573 static inline int _is_irn_forking(const ir_node *node) {
574         return is_op_forking(_get_irn_op(node));
575 }
576
577 static inline ir_type *_get_irn_type(ir_node *node) {
578         return _get_irn_op(node)->ops.get_type(node);
579 }
580
581 static inline ir_type *_get_irn_type_attr(ir_node *node) {
582         return _get_irn_op(node)->ops.get_type_attr(node);
583 }
584
585 static inline ir_entity *_get_irn_entity_attr(ir_node *node) {
586   return _get_irn_op(node)->ops.get_entity_attr(node);
587 }
588
589 static inline int _is_irn_constlike(const ir_node *node) {
590         return is_op_constlike(_get_irn_op(node));
591 }
592
593 static inline int _is_irn_always_opt(const ir_node *node) {
594         return is_op_always_opt(_get_irn_op(node));
595 }
596
597 static inline int _is_irn_keep(const ir_node *node) {
598         return is_op_keep(_get_irn_op(node));
599 }
600
601 static inline int _is_irn_start_block_placed(const ir_node *node) {
602         return is_op_start_block_placed(_get_irn_op(node));
603 }
604
605 static inline int _is_irn_machine_op(const ir_node *node) {
606         return is_op_machine(_get_irn_op(node));
607 }
608
609 static inline int _is_irn_machine_operand(const ir_node *node) {
610         return is_op_machine_operand(_get_irn_op(node));
611 }
612
613 static inline int _is_irn_machine_user(const ir_node *node, unsigned n) {
614         return is_op_machine_user(_get_irn_op(node), n);
615 }
616
617 static inline int _is_irn_cse_neutral(const ir_node *node) {
618         return is_op_cse_neutral(_get_irn_op(node));
619 }
620
621 static inline cond_jmp_predicate _get_Cond_jmp_pred(const ir_node *node) {
622         assert(_get_irn_op(node) == op_Cond);
623         return node->attr.cond.jmp_pred;
624 }
625
626 static inline void _set_Cond_jmp_pred(ir_node *node, cond_jmp_predicate pred) {
627         assert(_get_irn_op(node) == op_Cond);
628         node->attr.cond.jmp_pred = pred;
629 }
630
631 static inline void *_get_irn_generic_attr(ir_node *node) {
632         return &node->attr;
633 }
634
635 static inline const void *_get_irn_generic_attr_const(const ir_node *node) {
636         return &node->attr;
637 }
638
639 static inline unsigned _get_irn_idx(const ir_node *node) {
640         return node->node_idx;
641 }
642
643 static inline dbg_info *_get_irn_dbg_info(const ir_node *n) {
644         return n->dbi;
645 }  /* get_irn_dbg_info */
646
647 static inline void _set_irn_dbg_info(ir_node *n, dbg_info *db) {
648         n->dbi = db;
649 }
650
651 /**
652  * Sets the Phi list of a block.
653  */
654 static inline void _set_Block_phis(ir_node *block, ir_node *phi)
655 {
656         assert(_is_Block(block));
657         assert(phi == NULL || _is_Phi(phi));
658         block->attr.block.phis = phi;
659 }
660
661 /**
662  * Returns the link of a node.
663  * Intern version of libFirm.
664  */
665 static inline ir_node *_get_Block_phis(const ir_node *block)
666 {
667         assert(_is_Block(block));
668         return block->attr.block.phis;
669 }
670
671 /**
672  * Sets the next link of a Phi.
673  */
674 static inline void _set_Phi_next(ir_node *phi, ir_node *next)
675 {
676         assert(_is_Phi(phi));
677         phi->attr.phi.next = next;
678 }
679
680 /**
681  * Returns the link of a node.
682  * Intern version of libFirm.
683  */
684 static inline ir_node *_get_Phi_next(const ir_node *phi)
685 {
686         assert(_is_Phi(phi));
687         return phi->attr.phi.next;
688 }
689
690 /** Add a Phi node to the list of Block Phi's. */
691 static inline void _add_Block_phi(ir_node *block, ir_node *phi)
692 {
693         _set_Phi_next(phi, _get_Block_phis(block));
694         _set_Block_phis(block, phi);
695 }
696
697 /** Get the Block mark (single bit). */
698 static inline unsigned _get_Block_mark(const ir_node *block)
699 {
700         assert(_is_Block(block));
701         return block->attr.block.marked;
702 }
703
704 /** Set the Block mark (single bit). */
705 static inline void _set_Block_mark(ir_node *block, unsigned mark)
706 {
707         assert(_is_Block(block));
708         block->attr.block.marked = mark;
709 }
710
711 /** Returns non-zero if a node is a routine parameter. */
712 static inline int _is_arg_Proj(const ir_node *node)
713 {
714         if (! is_Proj(node))
715                 return 0;
716         node = get_Proj_pred(node);
717         if (! is_Proj(node))
718                 return 0;
719         return pn_Start_T_args == get_Proj_proj(node) && is_Start(get_Proj_pred(node));
720 }
721
722 /** initialize ir_node module */
723 void init_irnode(void);
724
725 /* this section MUST contain all inline functions */
726 #define is_ir_node(thing)                     _is_ir_node(thing)
727 #define get_irn_intra_arity(node)             _get_irn_intra_arity(node)
728 #define get_irn_inter_arity(node)             _get_irn_inter_arity(node)
729 #define get_irn_arity(node)                   _get_irn_arity(node)
730 #define get_irn_intra_n(node, n)              _get_irn_intra_n(node, n)
731 #define get_irn_inter_n(node, n)              _get_irn_inter_n(node, n)
732 #define get_irn_n(node, n)                    _get_irn_n(node, n)
733 #define get_irn_mode(node)                    _get_irn_mode(node)
734 #define set_irn_mode(node, mode)              _set_irn_mode(node, mode)
735 #define get_irn_irg(node)                     _get_irn_irg(node)
736 #define get_irn_op(node)                      _get_irn_op(node)
737 #define set_irn_op(node, op)                  _set_irn_op(node, op)
738 #define get_irn_opcode(node)                  _get_irn_opcode(node)
739 #define get_irn_visited(node)                 _get_irn_visited(node)
740 #define set_irn_visited(node, v)              _set_irn_visited(node, v)
741 #define mark_irn_visited(node)                _mark_irn_visited(node)
742 #define irn_visited(node)                     _irn_visited(node)
743 #define irn_visited_else_mark(node)           _irn_visited_else_mark(node)
744 #define set_irn_link(node, link)              _set_irn_link(node, link)
745 #define get_irn_link(node)                    _get_irn_link(node)
746 #define get_irn_pinned(node)                  _get_irn_pinned(node)
747 #define is_irn_pinned_in_irg(node)            _is_irn_pinned_in_irg(node)
748 #define is_unop(node)                         _is_unop(node)
749 #define is_binop(node)                        _is_binop(node)
750 #define is_Proj(node)                         _is_Proj(node)
751 #define is_Phi(node)                          _is_Phi(node)
752 #define is_strictConv(node)                   _is_strictConv(node)
753 #define is_SymConst_addr_ent(node)            _is_SymConst_addr_ent(node)
754 #define is_no_Block(node)                     _is_no_Block(node)
755 #define get_Block_n_cfgpreds(node)            _get_Block_n_cfgpreds(node)
756 #define get_Block_cfgpred(node, pos)          _get_Block_cfgpred(node, pos)
757 #define get_Block_cfgpred_block(node, pos)    _get_Block_cfgpred_block(node, pos)
758 #define get_Block_block_visited(node)         _get_Block_block_visited(node)
759 #define set_Block_block_visited(node, visit)  _set_Block_block_visited(node, visit)
760 #define mark_Block_block_visited(node)        _mark_Block_block_visited(node)
761 #define Block_block_visited(node)             _Block_block_visited(node)
762 #define set_Block_dead(block)                 _set_Block_dead(block)
763 #define is_Block_dead(block)                  _is_Block_dead(block)
764 #define get_Block_irg(block)                  _get_Block_irg(block)
765 #define get_Const_tarval(node)                _get_Const_tarval(node)
766 #define is_Const_null(node)                   _is_Const_null(node)
767 #define is_Const_one(node)                    _is_Const_one(node)
768 #define is_Const_all_one(node)                _is_Const_all_one(node)
769 #define is_irn_forking(node)                  _is_irn_forking(node)
770 #define copy_node_attr(irg,oldn,newn)         _copy_node_attr(irg,oldn,newn)
771 #define get_irn_type(node)                    _get_irn_type(node)
772 #define get_irn_type_attr(node)               _get_irn_type_attr(node)
773 #define get_irn_entity_attr(node)             _get_irn_entity_attr(node)
774 #define is_irn_constlike(node)                _is_irn_constlike(node)
775 #define is_irn_always_opt(node)               _is_irn_always_opt(node)
776 #define is_irn_keep(node)                     _is_irn_keep(node)
777 #define is_irn_start_block_placed(node)       _is_irn_start_block_placed(node)
778 #define is_irn_machine_op(node)               _is_irn_machine_op(node)
779 #define is_irn_machine_operand(node)          _is_irn_machine_operand(node)
780 #define is_irn_machine_user(node, n)          _is_irn_machine_user(node, n)
781 #define is_irn_cse_neutral(node)              _is_irn_cse_neutral(node)
782 #define get_Cond_jmp_pred(node)               _get_Cond_jmp_pred(node)
783 #define set_Cond_jmp_pred(node, pred)         _set_Cond_jmp_pred(node, pred)
784 #define get_irn_generic_attr(node)            _get_irn_generic_attr(node)
785 #define get_irn_generic_attr_const(node)      _get_irn_generic_attr_const(node)
786 #define get_irn_idx(node)                     _get_irn_idx(node)
787
788 #define get_irn_deps(node)                    _get_irn_deps(node)
789 #define set_irn_dep(node, pos, dep)           _set_irn_dep(node, pos, dep)
790 #define get_irn_dep(node, pos)                _get_irn_dep(node, pos)
791
792 #define get_irn_ins_or_deps(node)             _get_irn_ins_or_deps(node)
793 #define get_irn_in_or_dep(node, pos)          _get_irn_in_or_dep(node, pos)
794
795 #define get_irn_dbg_info(node)                _get_irn_dbg_info(node)
796 #define set_irn_dbg_info(node, db)            _set_irn_dbg_info(node, db)
797
798 #define set_Block_phis(block, phi)            _set_Block_phis(block, phi)
799 #define get_Block_phis(block)                 _get_Block_phis(block)
800 #define add_Block_phi(block, phi)             _add_Block_phi(block, phi)
801 #define get_Block_mark(block)                 _get_Block_mark(block)
802 #define set_Block_mark(block, mark)           _set_Block_mark(block, mark)
803
804 #define set_Phi_next(node, phi)               _set_Phi_next(node, phi)
805 #define get_Phi_next(node)                    _get_Phi_next(node)
806
807 #define is_arg_Proj(node)                     _is_arg_Proj(node)
808
809 #endif