Commit a0d23aec authored by Christoph Mallon's avatar Christoph Mallon
Browse files

irspec: Turn the negative flag customSerializer into a positive one called serializer.

parent 2572875e
......@@ -200,18 +200,18 @@ class Deleted:
@op
class Block:
"""A basic block"""
mode = "mode_BB"
block = "NULL"
pinned = "yes"
arity = "variable"
input_name = "cfgpred"
flags = []
attr_struct = "block_attr"
attrs = [
mode = "mode_BB"
block = "NULL"
pinned = "yes"
arity = "variable"
input_name = "cfgpred"
flags = []
attr_struct = "block_attr"
attrs = [
Attribute("entity", type="ir_entity*", init="NULL",
comment="entity representing this block"),
]
customSerializer = True
serializer = False
init = '''
res->attr.block.backedge = new_backedge_arr(get_irg_obstack(irg), arity);
......@@ -633,18 +633,18 @@ class Phi:
"""Choose a value based on control flow. A phi node has 1 input for each
predecessor of its block. If a block is entered from its nth predecessor
all phi nodes produce their nth input as result."""
pinned = "yes"
arity = "variable"
input_name = "pred"
flags = []
attrs = [
pinned = "yes"
arity = "variable"
input_name = "pred"
flags = []
attrs = [
Attribute("loop", type="int", init="0",
comment="wether Phi represents the observable effect of a (possibly) nonterminating loop"),
]
attr_struct = "phi_attr"
init = '''
attr_struct = "phi_attr"
init = '''
res->attr.phi.u.backedge = new_backedge_arr(get_irg_obstack(irg), arity);'''
customSerializer = True
serializer = False
@op
class Pin:
......
......@@ -106,7 +106,7 @@ def setnodedefaults(node):
setdefault(node, "attrs", [])
setdefault(node, "constructor", True)
setdefault(node, "constructor_args", [])
setdefault(node, "customSerializer", not node.constructor)
setdefault(node, "serializer", node.constructor)
setdefault(node, "block", None)
if hasattr(node, "__doc__"):
node.doc = trim_docstring(node.__doc__)
......
{{warning}}
{%- for node in nodes|hasnot('customSerializer') %}
{%- for node in nodes|has('serializer') %}
static ir_node *read_{{node.name}}(read_env_t *env)
{
{%- if not node.block %}
......@@ -63,7 +63,7 @@ static ir_node *read_{{node.name}}(read_env_t *env)
}
{% endfor %}
{%- for node in nodes|hasnot('customSerializer') %}
{%- for node in nodes|has('serializer') %}
static void write_{{node.name}}(write_env_t *env, const ir_node *node)
{
write_symbol(env, "{{node.name}}");
......@@ -94,14 +94,14 @@ static void write_{{node.name}}(write_env_t *env, const ir_node *node)
static void register_generated_node_readers(void)
{
{%- for node in nodes|hasnot('customSerializer') %}
{%- for node in nodes|has('serializer') %}
register_node_reader("{{node.name}}", read_{{node.name}});
{%- endfor %}
}
static void register_generated_node_writers(void)
{
{%- for node in nodes|hasnot('customSerializer') %}
{%- for node in nodes|has('serializer') %}
register_node_writer(op_{{node.name}}, write_{{node.name}});
{%- endfor %}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment