ir_spec.py 18 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from spec_util import abstract, setnodedefaults

class Op(object):
	"Base class for firm nodes"
abstract(Op)

class Unop(Op):
	"Unary nodes have exactly 1 input"
	name     = "unop"
	ins      = [ "op" ]
	op_index = 0
	pinned   = "no"
abstract(Unop)

class Binop(Op):
	"Binary nodes have exactly 2 inputs"
	name     = "binop"
	ins      = [ "left", "right" ]
	op_index = 0
	pinned   = "no"
abstract(Binop)

class Abs(Unop):
	flags = []

class Add(Binop):
	flags = ["commutative"]

class Alloc(Op):
30
	ins   = [ "mem", "count" ]
31
32
33
34
35
36
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "pointer to newly allocated memory",     "pn_Generic_other"),
	]
37
	flags = [ "fragile", "uses_memory" ]
38
39
40
41
42
43
44
45
46
	attrs = [
		dict(
			name = "type",
			type = "ir_type*"
		),
		dict(
			name = "where",
			type = "ir_where_alloc"
		)
47
48
49
	]
	pinned      = "yes"
	attr_struct = "alloc_attr"
50
51
52
	d_post = '''
	firm_alloc_frag_arr(res, op_Alloc, &res->attr.alloc.exc.frag_arr);
	'''
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

class Anchor(Op):
	mode        = "mode_ANY"
	arity       = "variable"
	flags       = [ "dump_noblock" ]
	pinned      = "yes"
	knownBlock  = True
	singleton   = True

class And(Binop):
	flags    = [ "commutative" ]

class ASM(Op):
	mode          = "mode_T"
	arity         = "variable"
	flags         = [ "keep", "uses_memory" ]
	pinned        = "memory"
	pinned_init   = "op_pin_state_pinned"
71
72
	attr_struct   = "asm_attr"
	attrs_name    = "assem"
73
74
75
76
77
78
79
80
	attrs = [
		dict(
			name = "input_constraints",
			type = "ir_asm_constraint*",
		),
		dict(
			name = "n_output_constraints",
			type = "int",
81
			noprop = True,
82
83
84
85
86
87
88
89
		),
		dict(
			name = "output_constraints",
			type = "ir_asm_constraint*",
		),
		dict(
			name = "n_clobbers",
			type = "int",
90
			noprop = True,
91
92
93
94
95
96
97
98
99
		),
		dict(
			name = "clobbers",
			type = "ident**",
		),
		dict(
			name = "text",
			type = "ident*",
		),
100
101
102
103
	]
	java_noconstr = True

class Bad(Op):
Matthias Braun's avatar
Matthias Braun committed
104
105
106
107
108
109
	mode        = "mode_Bad"
	flags       = [ "cfopcode", "fragile", "start_block", "dump_noblock" ]
	pinned      = "yes"
	knownBlock  = True
	singleton   = True
	attr_struct = "irg_attr"
110
111
	init = '''
	res->attr.irg.irg = irg;
112
113
114
115
116
117
118
119
120
121
122
123
	'''

class Block(Op):
	mode        = "mode_BB"
	knownBlock  = True
	block       = "NULL"
	pinned      = "yes"
	optimize    = False
	arity       = "variable"
	flags       = [ "labeled" ]
	attr_struct = "block_attr"
	java_noconstr = True
Moritz Kroll's avatar
Moritz Kroll committed
124
125
126
127
128
129
130

	init = '''
	/* macroblock header */
	res->in[0] = res;

	res->attr.block.is_dead     = 0;
	res->attr.block.is_mb_head  = 1;
131
	res->attr.block.irg.irg     = irg;
Moritz Kroll's avatar
Moritz Kroll committed
132
133
134
135
136
	res->attr.block.backedge    = new_backedge_arr(irg->obst, arity);
	res->attr.block.in_cg       = NULL;
	res->attr.block.cg_backedge = NULL;
	res->attr.block.extblk      = NULL;
	res->attr.block.mb_depth    = 0;
137
	res->attr.block.entity      = NULL;
Moritz Kroll's avatar
Moritz Kroll committed
138
139
140

	set_Block_matured(res, 1);
	set_Block_block_visited(res, 0);
141
142

	/* Create and initialize array for Phi-node construction. */
143
144
145
	if (get_irg_phase_state(irg) == phase_building) {
		res->attr.block.graph_arr = NEW_ARR_D(ir_node *, irg->obst, irg->n_loc);
		memset(res->attr.block.graph_arr, 0, irg->n_loc * sizeof(ir_node*));
146
	}
147
	'''
148

149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
	java_add   = '''
	public void addPred(Node node) {
		binding_cons.add_immBlock_pred(ptr, node.ptr);
	}

	public void mature() {
		binding_cons.mature_immBlock(ptr);
	}

	@Override
	public Block getBlock() {
		return null;
	}

	public boolean blockVisited() {
		return 0 != binding.Block_block_visited(ptr);
	}

	public void markBlockVisited() {
		binding.mark_Block_block_visited(ptr);
169
170
171
172
173
	}

	public boolean isBad() {
		return binding.is_Bad(ptr) != 0;
	}
174
175
176
177
	'''

class Bound(Op):
	ins    = [ "mem", "index", "lower", "upper" ]
178
179
180
181
182
183
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "the checked index",                     "pn_Generic_other"),
	]
184
185
186
187
 	flags  = [ "fragile", "highlevel" ]
	pinned = "exception"
	pinned_init = "op_pin_state_pinned"
	attr_struct = "bound_attr"
188
	attrs_name  = "bound"
189
190
191
	d_post = '''
	firm_alloc_frag_arr(res, op_Bound, &res->attr.bound.exc.frag_arr);
	'''
192
193
194
195

class Builtin(Op):
	ins      = [ "mem" ]
	arity    = "variable"
196
197
198
199
	outs     = [
		("M",        "memory result", "pn_Generic_M"),
		("1_result", "first result",  "pn_Generic_other"),
	]
200
	flags    = [ "uses_memory" ]
201
	attrs    = [
202
203
204
205
		dict(
			type = "ir_builtin_kind",
			name = "kind"
		),
206
		dict(
207
208
209
			type = "ir_type*",
			name = "type"
		)
210
211
212
213
	]
	pinned      = "memory"
	pinned_init = "op_pin_state_pinned"
	attr_struct = "builtin_attr"
214
	init   = '''
215
216
217
	assert((get_unknown_type() == type) || is_Method_type(type));
	'''

218
219
220
class Call(Op):
	ins      = [ "mem", "ptr" ]
	arity    = "variable"
221
222
223
224
225
226
227
	outs     = [
		("M",                "memory result",                         "pn_Generic_M"),
		("X_regular",        "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",         "control flow when exception occured",   "pn_Generic_X_except"),
		("T_result",         "tuple containing all results",          "pn_Generic_other"),
		("P_value_res_base", "pointer to memory register containing copied results passed by value"),
	]
228
	flags    = [ "fragile", "uses_memory" ]
229
	attrs    = [
230
231
232
		dict(
			type = "ir_type*",
			name = "type"
233
234
235
236
237
238
		),
		dict(
			type = "unsigned",
			name = "tail_call",
			# the tail call attribute can only be set by analysis
			init = "0"
239
		)
240
241
242
243
	]
	attr_struct = "call_attr"
	pinned      = "memory"
	pinned_init = "op_pin_state_pinned"
244
245
	init = '''
	assert((get_unknown_type() == type) || is_Method_type(type));
246
	'''
247
248
249
	d_post = '''
	firm_alloc_frag_arr(res, op_Call, &res->attr.call.exc.frag_arr);
	'''
250

Michael Beck's avatar
Michael Beck committed
251
class Cast(Unop):
252
253
	mode     = "get_irn_mode(irn_op)"
	flags    = [ "highlevel" ]
254
255
256
257
258
	attrs    = [
		dict(
			type = "ir_type*",
			name = "type"
		)
259
260
	]
	attr_struct = "cast_attr"
261
	init     = "assert(is_atomic_type(type));"
262
263

class Cmp(Binop):
264
	outs  = [
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
		("False", "always false",                            "0"),
		("Eq",    "equal",                                   "1"),
		("Lt",    "less",                                    "2"),
		("Le",    "less or equal",                           "pn_Cmp_Eq|pn_Cmp_Lt"),
		("Gt",    "greater",                                 "4"),
		("Ge",    "greater or equal",                        "pn_Cmp_Eq|pn_Cmp_Gt"),
		("Lg",    "less or greater ('not equal' for integer numbers)", "pn_Cmp_Lt|pn_Cmp_Gt"),
		("Leg",   "less, equal or greater ('not unordered')", "pn_Cmp_Lt|pn_Cmp_Eq|pn_Cmp_Gt"),
		("Uo",    "unordered",                               "8"),
		("Ue",    "unordered or equal",                      "pn_Cmp_Uo|pn_Cmp_Eq"),
		("Ul",    "unordered or less",                       "pn_Cmp_Uo|pn_Cmp_Lt"),
		("Ule",   "unordered, less or equal",                "pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Eq"),
		("Ug",    "unordered or greater",                    "pn_Cmp_Uo|pn_Cmp_Gt"),
		("Uge",   "onordered, greater or equal",             "pn_Cmp_Uo|pn_Cmp_Gt|pn_Cmp_Eq"),
		("Ne",    "unordered, less or greater ('not equal' for floatingpoint numbers)", "pn_Cmp_Uo|pn_Cmp_Lt|pn_Cmp_Gt"),
		("True",  "always true",                             "15"),
281
	]
282
283
284
285
	flags = []

class Cond(Op):
	ins      = [ "selector" ]
286
287
288
289
	outs     = [
		("false", "control flow if operand is \"false\""),
		("true",  "control flow if operand is \"true\""),
	]
290
291
	flags    = [ "cfopcode", "forking" ]
	pinned   = "yes"
292
293
294
295
296
297
298
299
300
301
302
	attrs    = [
		dict(
			name = "default_proj",
			type = "long",
			init = "0"
		),
		dict(
			name = "jmp_pred",
			type = "cond_jmp_predicate",
			init = "COND_JMP_PRED_NONE"
		)
303
	]
304
	attr_struct = "cond_attr"
305

306
307
308
309
310
class Confirm(Op):
	ins      = [ "value", "bound" ]
	mode     = "get_irn_mode(irn_value)"
	flags    = [ "highlevel" ]
	pinned   = "yes"
311
312
313
314
315
	attrs    = [
		dict(
			name = "cmp",
			type = "pn_Cmp"
		),
316
317
	]
	attr_struct = "confirm_attr"
318
	attrs_name  = "confirm"
319
320
321
322
323
324
325

class Const(Op):
	mode       = ""
	flags      = [ "constlike", "start_block" ]
	knownBlock = True
	pinned     = "no"
	attrs_name = "con"
326
327
328
329
330
	attrs      = [
		dict(
			type = "tarval*",
			name = "tarval",
		)
331
332
	]
	attr_struct = "const_attr"
333

334
335
class Conv(Unop):
	flags = []
336
337
338
339
340
341
342
343
344
345
	attrs = [
		dict(
			name = "strict",
			type = "int",
			init = "0",
			special = dict(
				prefix = "strict",
				init = "1"
			)
		)
346
347
	]
	attr_struct = "conv_attr"
348
	attrs_name  = "conv"
349
350
351

class CopyB(Op):
	ins   = [ "mem", "dst", "src" ]
352
353
354
355
356
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
	]
357
	flags = [ "fragile", "highlevel", "uses_memory" ]
358
359
	attrs = [
		dict(
360
361
			name = "type",
			type = "ir_type*"
362
		)
363
364
	]
	attr_struct = "copyb_attr"
365
	attrs_name  = "copyb"
366
367
	pinned      = "memory"
	pinned_init = "op_pin_state_pinned"
368
369
370
	d_post = '''
	firm_alloc_frag_arr(res, op_CopyB, &res->attr.copyb.exc.frag_arr);
	'''
371

372
373
class Div(Op):
	ins   = [ "mem", "left", "right" ]
374
375
376
377
378
379
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "result of computation",                 "pn_Generic_other"),
	]
380
381
	flags = [ "fragile", "uses_memory" ]
	attrs_name = "divmod"
382
383
384
385
386
	attrs = [
		dict(
			type = "ir_mode*",
			name = "resmode"
		),
Moritz Kroll's avatar
Moritz Kroll committed
387
388
389
390
391
392
393
394
		dict(
			name = "no_remainder",
			type = "int",
			init = "0",
			special = dict(
				suffix = "RL",
				init = "1"
			)
395
		)
396
397
398
399
400
	]
	attr_struct = "divmod_attr"
	pinned      = "exception"
	op_index    = 1
	arity_override = "oparity_binary"
401
402
403
	d_post = '''
	firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr);
	'''
404

405
406
class DivMod(Op):
	ins   = [ "mem", "left", "right" ]
407
408
409
410
411
412
413
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res_div",   "result of computation a/b",             "pn_Generic_other"),
		("res_mod",   "result of computation a%b"),
	]
414
415
	flags = [ "fragile", "uses_memory" ]
	attrs_name = "divmod"
416
417
418
419
420
	attrs = [
		dict(
			type = "ir_mode*",
			name = "resmode"
		),
421
422
423
424
425
	]
	attr_struct = "divmod_attr"
	pinned      = "exception"
	op_index    = 1
	arity_override = "oparity_binary"
426
427
428
	d_post = '''
	firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr);
	'''
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446

class Dummy(Op):
	ins   = []
	flags = [ "cfopcode", "fragile", "start_block", "constlike",
	          "dump_noblock" ]
	knownBlock = True
	pinned     = "yes"
	block      = "get_irg_start_block(irg)"

class End(Op):
	mode       = "mode_X"
	pinned     = "yes"
	arity      = "dynamic"
	flags      = [ "cfopcode" ]
	singleton  = True

class Eor(Binop):
	flags    = [ "commutative" ]
447

448
449
450
451
452
class Free(Op):
	ins    = [ "mem", "ptr", "size" ]
	mode   = "mode_M"
	flags  = [ "uses_memory" ]
	pinned = "yes"
453
	attrs  = [
454
		dict(
455
456
			name = "type",
			type = "ir_type*"
457
458
		),
		dict(
459
460
			name = "where",
			type = "ir_where_alloc"
461
		)
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
	]
	attr_struct = "free_attr"

class Id(Op):
	ins    = [ "pred" ]
	pinned = "no"
	flags  = []

class IJmp(Op):
	mode     = "mode_X"
	pinned   = "yes"
	ins      = [ "target" ]
	flags    = [ "cfopcode", "forking", "keep" ]

class InstOf(Op):
	ins   = [ "store", "obj" ]
478
479
480
481
482
483
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "checked object pointer",                "pn_Generic_other"),
	]
484
	flags = [ "highlevel" ]
485
486
487
488
489
	attrs = [
		dict(
			name = "type",
			type = "ir_type*"
		)
490
491
492
493
494
495
496
497
498
499
500
501
502
	]
	attr_struct = "io_attr"
	pinned      = "memory"
	pinned_init = "op_pin_state_floats"

class Jmp(Op):
	mode     = "mode_X"
	pinned   = "yes"
	ins      = []
	flags    = [ "cfopcode" ]

class Load(Op):
	ins      = [ "mem", "ptr" ]
503
504
505
506
507
508
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "result of load operation",              "pn_Generic_other"),
	]
509
510
511
	flags    = [ "fragile", "uses_memory" ]
	pinned   = "exception"
	pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned"
512
513
514
515
516
517
	attrs    = [
		dict(
			type = "ir_mode*",
			name = "mode",
			java_name = "load_mode"
		),
518
519
	]
	attr_struct = "load_attr"
520
521
	constructor_args = [
		dict(
Moritz Kroll's avatar
Moritz Kroll committed
522
			type = "ir_cons_flags",
523
524
			name = "flags",
		),
525
	]
526
527
528
	d_post = '''
	firm_alloc_frag_arr(res, op_Load, &res->attr.load.exc.frag_arr);
	'''
529
530
531
532
533
534

class Minus(Unop):
	flags = []

class Mod(Op):
	ins   = [ "mem", "left", "right" ]
535
536
537
538
539
540
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "result of computation",                 "pn_Generic_other"),
	]
541
542
	flags = [ "fragile", "uses_memory" ]
	attrs_name = "divmod"
543
	attrs = [
544
		dict(
545
546
			type = "ir_mode*",
			name = "resmode"
547
		),
548
549
550
551
552
	]
	attr_struct = "divmod_attr"
	pinned      = "exception"
	op_index    = 1
	arity_override = "oparity_binary"
553
554
555
	d_post = '''
	firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr);
	'''
Matthias Braun's avatar
Matthias Braun committed
556

557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
class Mul(Binop):
	flags = [ "commutative" ]

class Mulh(Binop):
	flags = [ "commutative" ]

class Mux(Op):
	ins    = [ "sel", "false", "true" ]
	flags  = []
	pinned = "no"

class NoMem(Op):
	mode       = "mode_M"
	flags      = [ "dump_noblock", "dump_noinput" ]
	pinned     = "yes"
	knownBlock = True
	singleton  = True

class Not(Unop):
	flags = []

class Or(Binop):
	flags = [ "commutative" ]

class Phi(Op):
582
583
584
585
	pinned        = "yes"
	arity         = "variable"
	flags         = []
	attr_struct   = "phi_attr"
586
	java_noconstr = True
Matthias Braun's avatar
Matthias Braun committed
587
588
589
590
591
592
	init = '''
	/* Memory Phis in endless loops must be kept alive.
	   As we can't distinguish these easily we keep all of them alive. */
   	if (is_Phi(res) && mode == mode_M)
		add_End_keepalive(get_irg_end(irg), res);
	'''
593
594
595
596
597
598
599
600

class Pin(Op):
	ins      = [ "op" ]
	mode     = "get_irn_mode(irn_op)"
	flags    = [ "highlevel" ]
	pinned   = "yes"

class Proj(Op):
601
602
603
604
605
606
607
608
	ins        = [ "pred" ]
	flags      = []
	pinned     = "no"
	knownBlock = True
	knownGraph = True
	block      = "get_nodes_block(irn_pred)"
	graph      = "get_irn_irg(irn_pred)"
	attrs      = [
609
610
		dict(
			type = "long",
611
			name = "proj",
612
613
			initname = "",
			noprop = False,
614
		)
615
616
617
618
619
	]
	attr_struct = "long"

class Quot(Op):
	ins   = [ "mem", "left", "right" ]
620
621
622
623
624
625
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
		("res",       "result of computation",                 "pn_Generic_other"),
	]
626
627
	flags = [ "fragile", "uses_memory" ]
	attrs_name = "divmod"
628
	attrs = [
629
		dict(
630
631
632
			type = "ir_mode*",
			name = "resmode"
		),
633
634
635
636
637
	]
	attr_struct = "divmod_attr"
	pinned      = "exception"
	op_index    = 1
	arity_override = "oparity_binary"
638
639
640
	d_post = '''
	firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);
	'''
641
642
643

class Raise(Op):
	ins    = [ "mem", "exo_ptr" ]
644
645
646
647
	outs  = [
		("M", "memory result",                     "pn_Generic_M"),
		("X", "control flow to exception handler", "pn_Generic_X_regular"),
	]
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
	flags  = [ "highlevel", "cfopcode" ]
	pinned = "yes"

class Return(Op):
	ins      = [ "mem" ]
	arity    = "variable"
	mode     = "mode_X"
	flags    = [ "cfopcode" ]
	pinned   = "yes"

class Rotl(Binop):
	flags    = []

class Sel(Op):
	ins    = [ "mem", "ptr" ]
	arity  = "variable"
	flags  = []
	mode   = "is_Method_type(get_entity_type(entity)) ? mode_P_code : mode_P_data"
	pinned = "no"
667
	attrs  = [
668
		dict(
669
670
671
			type = "ir_entity*",
			name = "entity"
		)
672
673
674
675
676
677
678
679
680
681
682
683
684
	]
	attr_struct = "sel_attr"

class Shl(Binop):
	flags = []

class Shr(Binop):
	flags = []

class Shrs(Binop):
	flags = []

class Start(Op):
685
686
687
688
689
690
691
	outs       = [
		("X_initial_exec", "control flow"),
		("M",              "initial memory"),
		("P_frame_base",   "frame base pointer"),
		("P_tls",          "pointer to thread local storage segment"),
		("T_args",         "function arguments")
	]
692
693
694
695
696
697
698
	mode       = "mode_T"
	pinned     = "yes"
	flags      = [ "cfopcode" ]
	singleton  = True

class Store(Op):
	ins      = [ "mem", "ptr", "value" ]
699
700
701
702
703
	outs  = [
		("M",         "memory result",                         "pn_Generic_M"),
		("X_regular", "control flow when no exception occurs", "pn_Generic_X_regular"),
		("X_except",  "control flow when exception occured",   "pn_Generic_X_except"),
	]
704
705
706
707
	flags    = [ "fragile", "uses_memory" ]
	pinned   = "exception"
	attr_struct = "store_attr"
	pinned_init = "flags & cons_floats ? op_pin_state_floats : op_pin_state_pinned"
708
	constructor_args = [
709
		dict(
710
711
			type = "ir_cons_flags",
			name = "flags",
712
		),
713
	]
714
715
716
	d_post = '''
	firm_alloc_frag_arr(res, op_Store, &res->attr.store.exc.frag_arr);
	'''
717
718
719
720
721
722
723
724
725

class Sub(Binop):
	flags = []

class SymConst(Op):
	mode       = "mode_P"
	flags      = [ "constlike", "start_block" ]
	knownBlock = True
	pinned     = "no"
726
	attrs      = [
727
		dict(
728
			type = "ir_entity*",
729
730
			name = "entity",
			noprop = True
731
		)
732
733
734
735
736
737
738
739
740
	]
	attr_struct = "symconst_attr"
	java_noconstr = True

class Sync(Op):
	mode     = "mode_M"
	flags    = []
	pinned   = "no"
	optimize = False
741
	arity    = "dynamic"
742

743
744
745
746
747
class Tuple(Op):
	arity  = "variable"
	mode   = "mode_T"
	pinned = "no"
	flags  = [ "labeled" ]
748
	java_noconstr = True
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771

class Unknown(Op):
	knownBlock = True
	pinned     = "yes"
	block      = "get_irg_start_block(irg)"
	flags      = [ "cfopcode", "fragile", "start_block", "constlike",
	               "dump_noblock" ]

# Prepare node list

def getOpList(namespace):
	nodes = []
	for t in namespace.values():
		if type(t) != type:
			continue

		if issubclass(t, Op):
			setnodedefaults(t)
			nodes.append(t)
	return nodes

nodes = getOpList(globals())
nodes = sorted(nodes, lambda x,y: cmp(x.name, y.name))