irnode_t.h 18.9 KB
Newer Older
Christian Würdig's avatar
Christian Würdig committed
1
/*
Michael Beck's avatar
Michael Beck committed
2
 * Copyright (C) 1995-2008 University of Karlsruhe.  All right reserved.
Christian Würdig's avatar
Christian Würdig committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 * This file is part of libFirm.
 *
 * This file may be distributed and/or modified under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation and appearing in the file LICENSE.GPL included in the
 * packaging of this file.
 *
 * Licensees holding valid libFirm Professional Edition licenses may use
 * this file in accordance with the libFirm Commercial License.
 * Agreement provided with the Software.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE.
 */

Michael Beck's avatar
Michael Beck committed
20
/**
Matthias Braun's avatar
Matthias Braun committed
21
22
23
 * @file
 * @brief   Representation of an intermediate operation -- private header.
 * @author  Martin Trapp, Christian Schaefer, Goetz Lindenmaier, Michael Beck
Michael Beck's avatar
Michael Beck committed
24
 */
Matthias Braun's avatar
Matthias Braun committed
25
26
#ifndef FIRM_IR_IRNODE_T_H
#define FIRM_IR_IRNODE_T_H
Götz Lindenmaier's avatar
Götz Lindenmaier committed
27

28
#include "irtypes.h"
29
30
31
32
33
#include "irnode.h"
#include "irop_t.h"
#include "irgraph_t.h"
#include "irflag_t.h"
#include "array.h"
34
#include "iredges_t.h"
Götz Lindenmaier's avatar
Götz Lindenmaier committed
35

36
37
38
39
40
41
/**
 * Returns the array with the ins.  The content of the array may not be
 * changed.
 * Note that this function returns the whole in array including the
 * block predecessor. So, it is NOT symmetric with set_irn_in().
 */
42
ir_node **get_irn_in(const ir_node *node);
Götz Lindenmaier's avatar
Götz Lindenmaier committed
43

44
/**
45
46
47
48
 * The amount of additional space for custom data to be allocated upon creating a new node.
 */
extern unsigned firm_add_node_size;

Michael Beck's avatar
Michael Beck committed
49
50
51
52
53
54
55
56
57
/**
 * Sets the get_type_attr operation for an ir_op_ops.
 *
 * @param code   the opcode for the default operation
 * @param ops    the operations initialized
 *
 * @return
 *    The operations.
 */
58
void firm_set_default_get_type_attr(unsigned code, ir_op_ops *ops);
Michael Beck's avatar
Michael Beck committed
59
60
61
62
63
64
65
66
67
68

/**
 * Sets the get_entity_attr operation for an ir_op_ops.
 *
 * @param code   the opcode for the default operation
 * @param ops    the operations initialized
 *
 * @return
 *    The operations.
 */
69
void firm_set_default_get_entity_attr(unsigned code, ir_op_ops *ops);
Michael Beck's avatar
Michael Beck committed
70

71
72
73
74
75
76
77
78
/**
 * Returns an array with the predecessors of the Block. Depending on
 * the implementation of the graph data structure this can be a copy of
 * the internal representation of predecessors as well as the internal
 * array itself. Therefore writing to this array might obstruct the IR.
 */
ir_node **get_Block_cfgpred_arr(ir_node *node);

Michael Beck's avatar
Michael Beck committed
79
/*-------------------------------------------------------------------*/
Götz Lindenmaier's avatar
Götz Lindenmaier committed
80
81
/*  These function are most used in libfirm.  Give them as static    */
/*  functions so they can be inlined.                                */
Michael Beck's avatar
Michael Beck committed
82
/*-------------------------------------------------------------------*/
Götz Lindenmaier's avatar
Götz Lindenmaier committed
83

84
85
86
87
/**
 * Checks whether a pointer points to a ir node.
 * Intern version for libFirm.
 */
88
static inline int is_ir_node_(const void *thing)
89
{
Michael Beck's avatar
Michael Beck committed
90
	return (get_kind(thing) == k_ir_node);
91
}
Götz Lindenmaier's avatar
Götz Lindenmaier committed
92

93
94
95
96
/**
 * Gets the op of a node.
 * Intern version for libFirm.
 */
97
static inline ir_op *get_irn_op_(const ir_node *node)
98
{
Michael Beck's avatar
Michael Beck committed
99
100
	assert(node);
	return node->op;
101
102
}

103
static inline void set_irn_op_(ir_node *node, ir_op *op)
104
{
Michael Beck's avatar
Michael Beck committed
105
106
	assert(node);
	node->op = op;
107
108
}

109
110
/** Copies all attributes stored in the old node  to the new node.
    Assumes both have the same opcode and sufficient size. */
111
static inline void copy_node_attr_(ir_graph *irg, const ir_node *old_node,
112
                                   ir_node *new_node)
113
{
114
	ir_op *op = get_irn_op_(old_node);
115

Michael Beck's avatar
Michael Beck committed
116
	/* must always exist */
117
	op->ops.copy_attr(irg, old_node, new_node);
118
119
}

120
121
122
123
/**
 * Gets the opcode of a node.
 * Intern version for libFirm.
 */
124
static inline unsigned get_irn_opcode_(const ir_node *node)
125
{
Michael Beck's avatar
Michael Beck committed
126
127
128
	assert(k_ir_node == get_kind(node));
	assert(node->op);
	return node->op->code;
129
}
Götz Lindenmaier's avatar
Götz Lindenmaier committed
130

Michael Beck's avatar
Michael Beck committed
131
132
133
134
/**
 * Returns the number of predecessors without the block predecessor.
 * Intern version for libFirm.
 */
135
static inline int get_irn_arity_(const ir_node *node)
136
{
137
	return (int)(ARR_LEN(node->in) - 1);
Götz Lindenmaier's avatar
Götz Lindenmaier committed
138
139
}

Michael Beck's avatar
Michael Beck committed
140
141
142
/**
 * Intern version for libFirm.
 */
143
static inline ir_node *get_irn_n_(const ir_node *node, int n)
144
{
Michael Beck's avatar
Michael Beck committed
145
	ir_node *nn;
Michael Beck's avatar
Michael Beck committed
146

147
	assert(-1 <= n && n < get_irn_arity_(node));
148

Michael Beck's avatar
Michael Beck committed
149
	nn = node->in[n + 1];
Michael Beck's avatar
Michael Beck committed
150
	if (nn->op != op_Id) return nn;
Michael Beck's avatar
Michael Beck committed
151

Michael Beck's avatar
Michael Beck committed
152
	return (node->in[n + 1] = skip_Id(nn));
Götz Lindenmaier's avatar
Götz Lindenmaier committed
153
154
}

155
156
157
/**
 * returns a hash value for a node
 */
158
static inline unsigned hash_irn(const ir_node *node)
159
160
161
162
{
	return (unsigned) get_irn_idx(node);
}

163
164
static inline int get_irn_deps_(const ir_node *node)
{
165
	return node->deps ? (int)ARR_LEN(node->deps) : 0;
Sebastian Hack's avatar
Sebastian Hack committed
166
167
}

168
169
static inline ir_node *get_irn_dep_(const ir_node *node, int pos)
{
Sebastian Hack's avatar
Sebastian Hack committed
170
	assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
171
	assert(pos >= 0 && pos < (int)ARR_LEN(node->deps) && "dependency index out of range");
Sebastian Hack's avatar
Sebastian Hack committed
172
173
174
	return node->deps[pos];
}

175
176
177
/* forward declaration outside iredges_t.h to avoid circular include problems */
void edges_notify_edge_kind(ir_node *src, int pos, ir_node *tgt, ir_node *old_tgt, ir_edge_kind_t kind, ir_graph *irg);

178
static inline void set_irn_dep_(ir_node *node, int pos, ir_node *dep)
179
{
Sebastian Hack's avatar
Sebastian Hack committed
180
181
182
	ir_node *old;

	assert(node->deps && "dependency array node yet allocated. use add_irn_dep()");
183
	assert(pos >= 0 && pos < (int)ARR_LEN(node->deps) && "dependency index out of range");
Sebastian Hack's avatar
Sebastian Hack committed
184
185
186
187
188
189
	old = node->deps[pos];
	node->deps[pos] = dep;
	edges_notify_edge_kind(node, pos, dep, old, EDGE_KIND_DEP, get_irn_irg(node));
}


190
static inline int get_irn_ins_or_deps_(const ir_node *irn)
191
{
192
	return get_irn_deps_(irn) + get_irn_arity_(irn);
Sebastian Hack's avatar
Sebastian Hack committed
193
194
}

195
static inline ir_node *get_irn_in_or_dep_(const ir_node *irn, int pos)
196
{
Sebastian Hack's avatar
Sebastian Hack committed
197
198
199
200
	int n_in = get_irn_arity(irn);
	return pos < n_in ? get_irn_n(irn, pos) : get_irn_dep(irn, pos - n_in);
}

Michael Beck's avatar
Michael Beck committed
201
202
203
204
/**
 * Gets the mode of a node.
 * Intern version for libFirm.
 */
205
static inline ir_mode *get_irn_mode_(const ir_node *node)
206
{
Michael Beck's avatar
Michael Beck committed
207
208
	assert(node);
	return node->mode;
Götz Lindenmaier's avatar
Götz Lindenmaier committed
209
210
}

Michael Beck's avatar
Michael Beck committed
211
/**
212
213
214
 * Sets the mode of a node.
 * Intern version of libFirm.
 */
215
static inline void set_irn_mode_(ir_node *node, ir_mode *mode)
216
{
Michael Beck's avatar
Michael Beck committed
217
218
	assert(node);
	node->mode = mode;
219
220
}

221
222
223
224
225
static inline int ir_has_irg_ref(const ir_node *node)
{
	return is_Block(node) || is_Bad(node) || is_Anchor(node);
}

226
static inline ir_graph *get_irn_irg_(const ir_node *node)
227
228
{
	if (! is_Block(node))
229
		node = get_nodes_block(node);
230
231
232
233
	assert(ir_has_irg_ref(node));
	return node->attr.irg.irg;
}

234
static inline ir_node *get_nodes_block_(const ir_node *node)
235
236
237
{
	assert(!is_Block(node));
	return get_irn_n(node, -1);
238
239
}

240
241
/**
 * Gets the visited counter of a node.
Michael Beck's avatar
Michael Beck committed
242
243
 * Intern version for libFirm.
 */
244
static inline ir_visited_t get_irn_visited_(const ir_node *node)
245
{
Michael Beck's avatar
Michael Beck committed
246
247
	assert(node);
	return node->visited;
Götz Lindenmaier's avatar
Götz Lindenmaier committed
248
249
}

Michael Beck's avatar
Michael Beck committed
250
/**
251
 * Sets the visited counter of a node.
Michael Beck's avatar
Michael Beck committed
252
253
 * Intern version for libFirm.
 */
254
static inline void set_irn_visited_(ir_node *node, ir_visited_t visited)
255
{
Michael Beck's avatar
Michael Beck committed
256
257
	assert(node);
	node->visited = visited;
258
259
260
261
262
263
}

/**
 * Mark a node as visited in a graph.
 * Intern version for libFirm.
 */
264
static inline void mark_irn_visited_(ir_node *node)
265
{
266
	node->visited = get_irn_irg(node)->visited;
267
268
269
270
271
272
}

/**
 * Returns non-zero if a node of was visited.
 * Intern version for libFirm.
 */
273
static inline int irn_visited_(const ir_node *node)
274
{
275
276
	ir_graph *irg = get_irn_irg(node);
	return node->visited >= irg->visited;
Götz Lindenmaier's avatar
Götz Lindenmaier committed
277
278
}

279
static inline int irn_visited_else_mark_(ir_node *node)
280
{
281
	if (irn_visited_(node))
282
		return 1;
283
	mark_irn_visited_(node);
284
285
286
	return 0;
}

287
288
289
290
/**
 * Sets the link of a node.
 * Intern version of libFirm.
 */
291
static inline void set_irn_link_(ir_node *node, void *link)
292
{
293
	assert(node);
Michael Beck's avatar
Michael Beck committed
294
	node->link = link;
295
296
297
298
299
300
}

/**
 * Returns the link of a node.
 * Intern version of libFirm.
 */
301
static inline void *get_irn_link_(const ir_node *node)
302
{
303
	assert(node && is_ir_node_(node));
Michael Beck's avatar
Michael Beck committed
304
	return node->link;
305
}
Götz Lindenmaier's avatar
Götz Lindenmaier committed
306

Michael Beck's avatar
Michael Beck committed
307
/**
308
309
310
 * Returns whether the node _always_ must be pinned.
 * I.e., the node is not floating after global cse.
 *
Michael Beck's avatar
Michael Beck committed
311
312
 * Intern version of libFirm.
 */
313
static inline op_pin_state get_irn_pinned_(const ir_node *node)
314
{
Michael Beck's avatar
Michael Beck committed
315
	op_pin_state state;
316
	assert(node && is_ir_node_(node));
Michael Beck's avatar
Michael Beck committed
317
	/* Check opcode */
318
	state = get_op_pinned_(get_irn_op_(node));
319

Michael Beck's avatar
Michael Beck committed
320
	if (state >= op_pin_state_exc_pinned)
321
		return (op_pin_state)node->attr.except.pin_state;
322

Michael Beck's avatar
Michael Beck committed
323
	return state;
Michael Beck's avatar
Michael Beck committed
324
325
}

326
static inline op_pin_state is_irn_pinned_in_irg_(const ir_node *node)
327
{
Michael Beck's avatar
Michael Beck committed
328
329
330
	if (get_irg_pinned(get_irn_irg(node)) == op_pin_state_floats)
		return get_irn_pinned(node);
	return op_pin_state_pinned;
331
332
}

333
334
335
/* include generated code */
#include "gen_irnode.h"

336
static inline int is_unop_(const ir_node *node)
337
{
338
	assert(node && is_ir_node_(node));
Michael Beck's avatar
Michael Beck committed
339
	return (node->op->opar == oparity_unary);
Michael Beck's avatar
Michael Beck committed
340
341
}

342
static inline int is_binop_(const ir_node *node)
343
{
344
	assert(node && is_ir_node_(node));
Michael Beck's avatar
Michael Beck committed
345
	return (node->op->opar == oparity_binary);
Michael Beck's avatar
Michael Beck committed
346
347
}

348
static inline int is_strictConv_(const ir_node *node)
349
{
350
	return is_Conv_(node) && get_Conv_strict(node);
Michael Beck's avatar
Michael Beck committed
351
352
}

353
static inline int is_SymConst_addr_ent_(const ir_node *node)
354
{
Michael Beck's avatar
Michael Beck committed
355
356
357
	return is_SymConst(node) && get_SymConst_kind(node) == symconst_addr_ent;
}

358
static inline int get_Block_n_cfgpreds_(const ir_node *node)
359
{
360
361
	assert(is_Block_(node));
	return get_irn_arity_(node);
362
363
}

364
static inline ir_node *get_Block_cfgpred_(const ir_node *node, int pos)
365
{
366
367
	assert(is_Block_(node));
	return get_irn_n_(node, pos);
368
369
}

370
371
/* Get the predecessor block.
 *
372
 *  Returns the block corresponding to the predecessor pos.
373
374
375
376
377
378
 *
 *  There are several ambiguities we resolve with this function:
 *  - The direct predecessor can be a Proj, which is not pinned.
 *    We walk from the predecessor to the next pinned node
 *    (skip_Proj) and return the block that node is in.
 *  - If we encounter the Bad node, this function does not return
Michael Beck's avatar
Michael Beck committed
379
 *    the Start block, but the Bad node.
380
 */
381
static inline ir_node *get_Block_cfgpred_block_(const ir_node *node, int pos)
382
{
383
384
385
386
387
388
389
390
	ir_node *res = get_Block_cfgpred(node, pos);
	if (is_Bad(res)) {
		/* must return a Bad with mode_BB! */
		ir_graph *irg = get_irn_irg(node);
		return new_r_Bad(irg, mode_BB);
	} else {
		return get_nodes_block(skip_Proj(res));
	}
391
392
}

393
static inline ir_visited_t get_Block_block_visited_(const ir_node *node)
394
{
395
	assert(is_Block(node));
Michael Beck's avatar
Michael Beck committed
396
	return node->attr.block.block_visited;
Michael Beck's avatar
Michael Beck committed
397
398
}

399
static inline void set_Block_block_visited_(ir_node *node, ir_visited_t visit)
400
{
401
	assert(is_Block(node));
Michael Beck's avatar
Michael Beck committed
402
	node->attr.block.block_visited = visit;
Michael Beck's avatar
Michael Beck committed
403
404
}

405
static inline void mark_Block_block_visited_(ir_node *node)
406
{
407
408
	ir_graph *irg = get_Block_irg(node);
	node->attr.block.block_visited = get_irg_block_visited(irg);
Michael Beck's avatar
Michael Beck committed
409
410
}

411
static inline int Block_block_visited_(const ir_node *node)
412
{
413
414
	ir_graph *irg = get_Block_irg(node);
	return node->attr.block.block_visited >= get_irg_block_visited(irg);
415
416
}

417
static inline ir_graph *get_Block_irg_(const ir_node *block)
418
{
419
	assert(is_Block(block));
420
	return block->attr.irg.irg;
421
422
}

423
424
425
static inline ir_tarval *get_Const_tarval_(const ir_node *node)
{
	assert(get_irn_op_(node) == op_Const);
426
	return node->attr.con.tarval;
Sebastian Hack's avatar
Sebastian Hack committed
427
428
}

429
430
431
static inline int is_Const_null_(const ir_node *node)
{
	return tarval_is_null(get_Const_tarval_(node));
432
}
Sebastian Hack's avatar
Sebastian Hack committed
433

434
435
436
static inline int is_Const_one_(const ir_node *node)
{
	return tarval_is_one(get_Const_tarval_(node));
437
}
Sebastian Hack's avatar
Sebastian Hack committed
438

439
440
441
static inline int is_Const_all_one_(const ir_node *node)
{
	return tarval_is_all_one(get_Const_tarval_(node));
Sebastian Hack's avatar
Sebastian Hack committed
442
443
}

444
445
446
static inline int is_irn_forking_(const ir_node *node)
{
	return is_op_forking(get_irn_op_(node));
Michael Beck's avatar
Michael Beck committed
447
448
}

449
450
451
static inline ir_type *get_irn_type_attr_(ir_node *node)
{
	return get_irn_op_(node)->ops.get_type_attr(node);
Michael Beck's avatar
Michael Beck committed
452
453
}

454
455
456
static inline ir_entity *get_irn_entity_attr_(ir_node *node)
{
	return get_irn_op_(node)->ops.get_entity_attr(node);
Michael Beck's avatar
Michael Beck committed
457
458
}

459
460
461
static inline int is_irn_constlike_(const ir_node *node)
{
	return is_op_constlike(get_irn_op_(node));
Michael Beck's avatar
Michael Beck committed
462
463
}

464
465
466
static inline int is_irn_keep_(const ir_node *node)
{
	return is_op_keep(get_irn_op_(node));
Michael Beck's avatar
Michael Beck committed
467
468
}

469
470
471
static inline int is_irn_start_block_placed_(const ir_node *node)
{
	return is_op_start_block_placed(get_irn_op_(node));
472
473
}

474
475
476
static inline int is_irn_cse_neutral_(const ir_node *node)
{
	return is_op_cse_neutral(get_irn_op_(node));
477
478
}

479
480
481
static inline cond_jmp_predicate get_Cond_jmp_pred_(const ir_node *node)
{
	assert(get_irn_op_(node) == op_Cond);
482
	return node->attr.cond.jmp_pred;
483
484
}

485
486
487
static inline void set_Cond_jmp_pred_(ir_node *node, cond_jmp_predicate pred)
{
	assert(get_irn_op_(node) == op_Cond);
488
	node->attr.cond.jmp_pred = pred;
489
490
}

491
492
static inline void *get_irn_generic_attr_(ir_node *node)
{
493
494
495
	return &node->attr;
}

496
497
static inline const void *get_irn_generic_attr_const_(const ir_node *node)
{
498
499
500
	return &node->attr;
}

501
502
static inline unsigned get_irn_idx_(const ir_node *node)
{
Michael Beck's avatar
Michael Beck committed
503
	return node->node_idx;
504
505
}

506
507
static inline dbg_info *get_irn_dbg_info_(const ir_node *n)
{
508
	return n->dbi;
509
}
510

511
512
static inline void set_irn_dbg_info_(ir_node *n, dbg_info *db)
{
513
514
515
	n->dbi = db;
}

516
517
518
/**
 * Sets the Phi list of a block.
 */
519
static inline void set_Block_phis_(ir_node *block, ir_node *phi)
520
{
521
522
	assert(is_Block_(block));
	assert(phi == NULL || is_Phi_(phi));
523
524
525
526
527
528
529
	block->attr.block.phis = phi;
}

/**
 * Returns the link of a node.
 * Intern version of libFirm.
 */
530
static inline ir_node *get_Block_phis_(const ir_node *block)
531
{
532
	assert(is_Block_(block));
533
534
535
	return block->attr.block.phis;
}

536
static inline void set_Phi_next_(ir_node *phi, ir_node *next)
537
{
538
	assert(is_Phi_(phi));
539
540
541
	phi->attr.phi.next = next;
}

542
static inline ir_node *get_Phi_next_(const ir_node *phi)
543
{
544
	assert(is_Phi_(phi));
545
546
547
	return phi->attr.phi.next;
}

Michael Beck's avatar
Michael Beck committed
548
/** Add a Phi node to the list of Block Phi's. */
549
static inline void add_Block_phi_(ir_node *block, ir_node *phi)
550
{
551
552
553
	assert(is_Block_(block));
	set_Phi_next_(phi, get_Block_phis_(block));
	set_Block_phis_(block, phi);
Michael Beck's avatar
Michael Beck committed
554
555
}

556
/** Get the Block mark (single bit). */
557
static inline unsigned get_Block_mark_(const ir_node *block)
558
{
559
	assert(is_Block_(block));
560
561
562
563
	return block->attr.block.marked;
}

/** Set the Block mark (single bit). */
564
static inline void set_Block_mark_(ir_node *block, unsigned mark)
565
{
566
	assert(is_Block_(block));
567
568
	block->attr.block.marked = mark;
}
Michael Beck's avatar
Michael Beck committed
569

Michael Beck's avatar
Michael Beck committed
570
/** Returns non-zero if a node is a routine parameter. */
571
static inline int is_arg_Proj_(const ir_node *node)
572
{
Michael Beck's avatar
Michael Beck committed
573
574
575
576
577
578
579
580
	if (! is_Proj(node))
		return 0;
	node = get_Proj_pred(node);
	if (! is_Proj(node))
		return 0;
	return pn_Start_T_args == get_Proj_proj(node) && is_Start(get_Proj_pred(node));
}

Matthias Braun's avatar
Matthias Braun committed
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
static inline size_t ir_switch_table_get_n_entries_(const ir_switch_table *table)
{
	return table->n_entries;
}

static inline ir_switch_table_entry *ir_switch_table_get_entry(
		ir_switch_table *table, size_t entry)
{
	assert(entry < table->n_entries);
	return &table->entries[entry];
}

static inline const ir_switch_table_entry *ir_switch_table_get_entry_const(
		const ir_switch_table *table, size_t entry)
{
	assert(entry < table->n_entries);
	return &table->entries[entry];
}

600
601
/** initialize ir_node module */
void init_irnode(void);
Michael Beck's avatar
Michael Beck committed
602

603
/* this section MUST contain all inline functions */
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
#define is_ir_node(thing)                     is_ir_node_(thing)
#define get_irn_arity(node)                   get_irn_arity_(node)
#define get_irn_n(node, n)                    get_irn_n_(node, n)
#define get_irn_mode(node)                    get_irn_mode_(node)
#define set_irn_mode(node, mode)              set_irn_mode_(node, mode)
#define get_irn_irg(node)                     get_irn_irg_(node)
#define get_nodes_block(node)                 get_nodes_block_(node)
#define get_irn_op(node)                      get_irn_op_(node)
#define set_irn_op(node, op)                  set_irn_op_(node, op)
#define get_irn_opcode(node)                  get_irn_opcode_(node)
#define get_irn_visited(node)                 get_irn_visited_(node)
#define set_irn_visited(node, v)              set_irn_visited_(node, v)
#define mark_irn_visited(node)                mark_irn_visited_(node)
#define irn_visited(node)                     irn_visited_(node)
#define irn_visited_else_mark(node)           irn_visited_else_mark_(node)
#define set_irn_link(node, link)              set_irn_link_(node, link)
#define get_irn_link(node)                    get_irn_link_(node)
#define get_irn_pinned(node)                  get_irn_pinned_(node)
#define is_irn_pinned_in_irg(node)            is_irn_pinned_in_irg_(node)
#define is_unop(node)                         is_unop_(node)
#define is_binop(node)                        is_binop_(node)
#define is_Proj(node)                         is_Proj_(node)
#define is_Phi(node)                          is_Phi_(node)
#define is_strictConv(node)                   is_strictConv_(node)
#define is_SymConst_addr_ent(node)            is_SymConst_addr_ent_(node)
#define get_Block_n_cfgpreds(node)            get_Block_n_cfgpreds_(node)
#define get_Block_cfgpred(node, pos)          get_Block_cfgpred_(node, pos)
#define get_Block_cfgpred_block(node, pos)    get_Block_cfgpred_block_(node, pos)
#define get_Block_block_visited(node)         get_Block_block_visited_(node)
#define set_Block_block_visited(node, visit)  set_Block_block_visited_(node, visit)
#define mark_Block_block_visited(node)        mark_Block_block_visited_(node)
#define Block_block_visited(node)             Block_block_visited_(node)
#define get_Block_irg(block)                  get_Block_irg_(block)
#define get_Const_tarval(node)                get_Const_tarval_(node)
#define is_Const_null(node)                   is_Const_null_(node)
#define is_Const_one(node)                    is_Const_one_(node)
#define is_Const_all_one(node)                is_Const_all_one_(node)
#define is_irn_forking(node)                  is_irn_forking_(node)
#define copy_node_attr(irg,oldn,newn)         copy_node_attr_(irg,oldn,newn)
#define get_irn_type(node)                    get_irn_type_(node)
#define get_irn_type_attr(node)               get_irn_type_attr_(node)
#define get_irn_entity_attr(node)             get_irn_entity_attr_(node)
#define is_irn_constlike(node)                is_irn_constlike_(node)
#define is_irn_keep(node)                     is_irn_keep_(node)
#define is_irn_start_block_placed(node)       is_irn_start_block_placed_(node)
#define is_irn_cse_neutral(node)              is_irn_cse_neutral_(node)
#define get_Cond_jmp_pred(node)               get_Cond_jmp_pred_(node)
#define set_Cond_jmp_pred(node, pred)         set_Cond_jmp_pred_(node, pred)
#define get_irn_generic_attr(node)            get_irn_generic_attr_(node)
#define get_irn_generic_attr_const(node)      get_irn_generic_attr_const_(node)
#define get_irn_idx(node)                     get_irn_idx_(node)

#define get_irn_deps(node)                    get_irn_deps_(node)
#define set_irn_dep(node, pos, dep)           set_irn_dep_(node, pos, dep)
#define get_irn_dep(node, pos)                get_irn_dep_(node, pos)

#define get_irn_ins_or_deps(node)             get_irn_ins_or_deps_(node)
#define get_irn_in_or_dep(node, pos)          get_irn_in_or_dep_(node, pos)

#define get_irn_dbg_info(node)                get_irn_dbg_info_(node)
#define set_irn_dbg_info(node, db)            set_irn_dbg_info_(node, db)

#define set_Block_phis(block, phi)            set_Block_phis_(block, phi)
#define get_Block_phis(block)                 get_Block_phis_(block)
#define add_Block_phi(block, phi)             add_Block_phi_(block, phi)
#define get_Block_mark(block)                 get_Block_mark_(block)
#define set_Block_mark(block, mark)           set_Block_mark_(block, mark)

#define set_Phi_next(node, phi)               set_Phi_next_(node, phi)
#define get_Phi_next(node)                    get_Phi_next_(node)

#define is_arg_Proj(node)                     is_arg_Proj_(node)
Matthias Braun's avatar
Matthias Braun committed
676
#define ir_switch_table_get_n_entries(table)  ir_switch_table_get_n_entries_(table)
Michael Beck's avatar
Michael Beck committed
677

Matthias Braun's avatar
Matthias Braun committed
678
#endif