/* Calculate a hash value of a node. */
unsigned ir_node_hash (ir_node *node);
+/**
+ * Returns the tarval of a Const node or tarval_bad for all other nodes.
+ */
+static INLINE tarval *
+value_of(ir_node *n) {
+ if ((n != NULL) && (get_irn_op(n) == op_Const))
+ return get_Const_tarval(n); /* might return tarval_bad */
+ else
+ return tarval_bad;
+}
+
+/**
+ * Sets the default operation for an ir_op_ops.
+ *
+ * @param code the opcode for the default operation
+ * @param ops the operations initialized
+ *
+ * @return
+ * The operations.
+ */
+ir_op_ops *firm_set_default_operations(opcode code, ir_op_ops *ops);
# endif /* _IROPT_T_H_ */