- if hasattr(node, "flags"):
- flags = node.flags
- if "fragile" in flags:
- if not inout_contains(node.ins, "mem"):
- print "ERROR: fragile node %s needs an input named 'mem'" % node.__name__
- if not inout_contains(node.outs, "X_regular"):
- print "ERROR: fragile node %s needs an output named 'X_regular'" % node.__name__
- if not inout_contains(node.outs, "X_except"):
- print "ERROR: fragile node %s needs an output named 'X_except'" % node.__name__
+ if hasattr(node, "pinned_init") and not is_dynamic_pinned(node):
+ print "ERROR: node %s has pinned_init attribute but is not marked as dynamically pinned" % node.__name__
+ if is_fragile(node):
+ if not is_dynamic_pinned(node):
+ print "ERROR: fragile node %s must be dynamically pinned" % node.__name__
+ if not hasattr(node, "throws_init"):
+ print "ERROR: fragile node %s needs a throws_init attribute" % node.__name__
+ if not inout_contains(node.ins, "mem"):
+ print "ERROR: fragile node %s needs an input named 'mem'" % node.__name__
+ if not inout_contains(node.outs, "X_regular"):
+ print "ERROR: fragile node %s needs an output named 'X_regular'" % node.__name__
+ if not inout_contains(node.outs, "X_except"):
+ print "ERROR: fragile node %s needs an output named 'X_except'" % node.__name__
+ else:
+ if hasattr(node, "throws_init"):
+ print "ERROR: throws_init only makes sense for fragile nodes"
+