projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed indentation of generated code.
[libfirm]
/
scripts
/
ir_spec.py
diff --git
a/scripts/ir_spec.py
b/scripts/ir_spec.py
index
aeed4f9
..
0961109
100755
(executable)
--- a/
scripts/ir_spec.py
+++ b/
scripts/ir_spec.py
@@
-20,9
+20,6
@@
class Binop(Op):
pinned = "no"
abstract(Binop)
pinned = "no"
abstract(Binop)
-class Abs(Unop):
- flags = []
-
class Add(Binop):
flags = ["commutative"]
class Add(Binop):
flags = ["commutative"]
@@
-56,6
+53,7
@@
class Anchor(Op):
attr_struct = "irg_attr"
knownBlock = True
singleton = True
attr_struct = "irg_attr"
knownBlock = True
singleton = True
+ noconstructor = True
class And(Binop):
flags = [ "commutative" ]
class And(Binop):
flags = [ "commutative" ]
@@
-96,46
+94,38
@@
class ASM(Op):
type = "ident*",
),
]
type = "ident*",
),
]
- java_noconstr = True
class Bad(Op):
class Bad(Op):
- mode = "mode_Bad"
- flags = [ "cfopcode", "start_block", "dump_noblock" ]
- pinned = "yes"
- knownBlock = True
- singleton = True
- attr_struct = "irg_attr"
+ mode = "mode_T"
+ flags = [ "cfopcode", "start_block", "dump_noblock" ]
+ pinned = "yes"
+ knownBlock = True
+ block = "get_irg_start_block(irg)"
+ singleton = True
+ attr_struct = "bad_attr"
init = '''
init = '''
- res->attr.irg.irg = irg;
+ res->attr.
bad.
irg.irg = irg;
'''
'''
+class Deleted(Op):
+ mode = "mode_Bad"
+ flags = [ ]
+ pinned = "yes"
+ noconstructor = True
+
class Block(Op):
mode = "mode_BB"
knownBlock = True
block = "NULL"
pinned = "yes"
class Block(Op):
mode = "mode_BB"
knownBlock = True
block = "NULL"
pinned = "yes"
- optimize = False
arity = "variable"
flags = [ "labeled" ]
attr_struct = "block_attr"
arity = "variable"
flags = [ "labeled" ]
attr_struct = "block_attr"
- java_noconstr = True
init = '''
init = '''
- /* macroblock header */
- res->in[0] = res;
-
- res->attr.block.is_dead = 0;
- res->attr.block.is_mb_head = 1;
res->attr.block.irg.irg = irg;
res->attr.block.backedge = new_backedge_arr(irg->obst, arity);
res->attr.block.irg.irg = irg;
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;
- res->attr.block.entity = NULL;
-
set_Block_matured(res, 1);
set_Block_matured(res, 1);
- set_Block_block_visited(res, 0);
/* Create and initialize array for Phi-node construction. */
if (get_irg_phase_state(irg) == phase_building) {
/* Create and initialize array for Phi-node construction. */
if (get_irg_phase_state(irg) == phase_building) {
@@
-146,11
+136,11
@@
class Block(Op):
java_add = '''
public void addPred(Node node) {
java_add = '''
public void addPred(Node node) {
- binding_cons.add_immBlock_pred(ptr, node.ptr);
+ binding_
ir
cons.add_immBlock_pred(ptr, node.ptr);
}
public void mature() {
}
public void mature() {
- binding_cons.mature_immBlock(ptr);
+ binding_
ir
cons.mature_immBlock(ptr);
}
@Override
}
@Override
@@
-159,15
+149,15
@@
class Block(Op):
}
public boolean blockVisited() {
}
public boolean blockVisited() {
- return 0 != binding.Block_block_visited(ptr);
+ return 0 != binding
_irnode
.Block_block_visited(ptr);
}
public void markBlockVisited() {
}
public void markBlockVisited() {
- binding.mark_Block_block_visited(ptr);
+ binding
_irnode
.mark_Block_block_visited(ptr);
}
public boolean isBad() {
}
public boolean isBad() {
- return binding.is_Bad(ptr) != 0;
+ return binding
_irnode
.is_Bad(ptr) != 0;
}
'''
}
'''
@@
-323,7
+313,7
@@
class Const(Op):
attrs_name = "con"
attrs = [
dict(
attrs_name = "con"
attrs = [
dict(
- type = "tarval*",
+ type = "
ir_
tarval*",
name = "tarval",
)
]
name = "tarval",
)
]
@@
-428,6
+418,8
@@
class End(Op):
pinned = "yes"
arity = "dynamic"
flags = [ "cfopcode" ]
pinned = "yes"
arity = "dynamic"
flags = [ "cfopcode" ]
+ knownBlock = True
+ block = "get_irg_end_block(irg)"
singleton = True
class Eor(Binop):
singleton = True
class Eor(Binop):
@@
-548,11
+540,12
@@
class Mux(Op):
pinned = "no"
class NoMem(Op):
pinned = "no"
class NoMem(Op):
- mode = "mode_M"
- flags = [ "dump_noblock", "dump_noinput" ]
- pinned = "yes"
- knownBlock = True
- singleton = True
+ mode = "mode_M"
+ flags = [ "dump_noblock", "dump_noinput" ]
+ pinned = "yes"
+ knownBlock = True
+ block = "get_irg_start_block(irg)"
+ singleton = True
class Not(Unop):
flags = []
class Not(Unop):
flags = []
@@
-565,7
+558,6
@@
class Phi(Op):
arity = "variable"
flags = []
attr_struct = "phi_attr"
arity = "variable"
flags = []
attr_struct = "phi_attr"
- java_noconstr = True
init = '''
/* Memory Phis in endless loops must be kept alive.
As we can't distinguish these easily we keep all of them alive. */
init = '''
/* Memory Phis in endless loops must be kept alive.
As we can't distinguish these easily we keep all of them alive. */
@@
-672,6
+664,8
@@
class Start(Op):
pinned = "yes"
flags = [ "cfopcode" ]
singleton = True
pinned = "yes"
flags = [ "cfopcode" ]
singleton = True
+ knownBlock = True
+ block = "get_irg_start_block(irg)"
class Store(Op):
ins = [ "mem", "ptr", "value" ]
class Store(Op):
ins = [ "mem", "ptr", "value" ]
@@
-707,13
+701,11
@@
class SymConst(Op):
)
]
attr_struct = "symconst_attr"
)
]
attr_struct = "symconst_attr"
- java_noconstr = True
class Sync(Op):
mode = "mode_M"
flags = []
pinned = "no"
class Sync(Op):
mode = "mode_M"
flags = []
pinned = "no"
- optimize = False
arity = "dynamic"
class Tuple(Op):
arity = "dynamic"
class Tuple(Op):
@@
-721,7
+713,6
@@
class Tuple(Op):
mode = "mode_T"
pinned = "no"
flags = [ "labeled" ]
mode = "mode_T"
pinned = "no"
flags = [ "labeled" ]
- java_noconstr = True
class Unknown(Op):
knownBlock = True
class Unknown(Op):
knownBlock = True