Commit 4719c02b authored by Matthias Braun's avatar Matthias Braun Committed by Matthias Braun
Browse files

remove the strange/unused concept of mem_pinned.

I don't really understand what it was supposed to do (because nodes
using/producing should be pretty much immovable anyway because of their
dependencies, so an additional pinning type appears unnecessary).
In practice there was no code differentiating between mem_pinned and exc_pinned.
parent 3b2c0f56
......@@ -203,8 +203,6 @@ typedef enum op_pin_state {
op_pin_state_pinned = 1, /**< Nodes must remain in this basic block. */
op_pin_state_exc_pinned, /**< Node must remain in this basic block if it
can throw an exception, else can float. */
op_pin_state_mem_pinned /**< Node must remain in this basic block if it
uses memory, else can float. */
} op_pin_state;
/**
......
......@@ -269,7 +269,6 @@ static void symtbl_init(void)
INSERTENUM(tt_pin_state, op_pin_state_floats);
INSERTENUM(tt_pin_state, op_pin_state_pinned);
INSERTENUM(tt_pin_state, op_pin_state_exc_pinned);
INSERTENUM(tt_pin_state, op_pin_state_mem_pinned);
INSERTENUM(tt_type_state, layout_undefined);
INSERTENUM(tt_type_state, layout_fixed);
......
......@@ -136,7 +136,6 @@ const char *get_op_pin_state_name(op_pin_state s)
XXX(op_pin_state_floats);
XXX(op_pin_state_pinned);
XXX(op_pin_state_exc_pinned);
XXX(op_pin_state_mem_pinned);
#undef XXX
}
return "<none>";
......
......@@ -125,8 +125,6 @@ def format_pinned(node):
return "op_pin_state_floats"
if pinned == "exception":
return "op_pin_state_exc_pinned"
if pinned == "memory":
return "op_pin_state_mem_pinned"
print "WARNING: Unknown pinned state %s in format pined" % pinned
return ""
......
......@@ -104,7 +104,7 @@ class ASM:
arity = "variable"
input_name = "input"
flags = [ "keep", "uses_memory" ]
pinned = "memory"
pinned = "exception"
pinned_init = "op_pin_state_pinned"
attr_struct = "asm_attr"
attrs_name = "assem"
......@@ -246,7 +246,7 @@ class Builtin:
comment = "method type for the builtin call",
)
]
pinned = "memory"
pinned = "exception"
pinned_init = "op_pin_state_pinned"
attr_struct = "builtin_attr"
init = '''
......@@ -280,7 +280,7 @@ class Call:
),
]
attr_struct = "call_attr"
pinned = "memory"
pinned = "exception"
pinned_init = "op_pin_state_pinned"
throws_init = "false"
init = '''
......@@ -428,7 +428,7 @@ class CopyB:
)
]
attr_struct = "copyb_attr"
pinned = "memory"
pinned = "exception"
pinned_init = "op_pin_state_pinned"
throws_init = "false"
......@@ -553,7 +553,7 @@ class InstOf:
)
]
attr_struct = "io_attr"
pinned = "memory"
pinned = "exception"
pinned_init = "op_pin_state_floats"
@op
......
......@@ -17,7 +17,7 @@ def isOp(nodetype):
return hasattr(nodetype, "__is_firm_op")
def is_dynamic_pinned(node):
return node.pinned in ["memory", "exception"]
return node.pinned == "exception"
def is_fragile(node):
return hasattr(node, "flags") and "fragile" in node.flags
......@@ -31,7 +31,7 @@ def inout_contains(l, name):
def verify_node(node):
if not hasattr(node, "pinned"):
print "%s: NO PINNED SET" % node.name
elif node.pinned not in ["yes", "no", "memory", "exception"]:
elif node.pinned not in ["yes", "no", "exception"]:
print "%s: UNKNOWN PINNED MODE: %s" % (node.name, node.pinned)
if not hasattr(node, "flags"):
......
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