summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
eb2bcd4)
get_op_ops() added
[r6817]
void (set_generic_function_ptr)(ir_op *op, op_func func) {
_set_generic_function_ptr(op, func);
}
void (set_generic_function_ptr)(ir_op *op, op_func func) {
_set_generic_function_ptr(op, func);
}
+
+/* Returns the ir_op_ops of an ir_op. */
+const ir_op_ops *(get_op_ops)(const ir_op *op) {
+ return _get_op_ops(op);
+}
*/
typedef int (*verify_proj_node_func)(ir_node *self, ir_node *proj);
*/
typedef int (*verify_proj_node_func)(ir_node *self, ir_node *proj);
+/**
+ * Reasons to call the dump_node operation:
+ */
+typedef enum {
+ dump_node_opcode_txt, /**< dump the opcode */
+ dump_node_mode_txt, /**< dump the mode */
+ dump_node_nodeattr_txt, /**< dump the node attributes */
+} dump_reason_t;
+
+/**
+ * The dump_node operation.
+ * Writes several informations requested by reason to
+ * an output file
+ */
+typedef int (*dump_node_func)(ir_node *self, FILE *F, dump_reason_t reason);
+
/**
* io_op Operations.
*/
/**
* io_op Operations.
*/
get_type_func get_type; /**< return the type of a node */
verify_node_func verify_node; /**< verify the node */
verify_proj_node_func verify_proj_node; /**< verify the Proj node */
get_type_func get_type; /**< return the type of a node */
verify_node_func verify_node; /**< verify the node */
verify_proj_node_func verify_proj_node; /**< verify the Proj node */
+ dump_node_func dump_node; /**< dump a node */
op_func generic; /**< a generic function */
} ir_op_ops;
op_func generic; /**< a generic function */
} ir_op_ops;
unsigned flags, op_arity opar, int op_index, size_t attr_size,
const ir_op_ops *ops);
unsigned flags, op_arity opar, int op_index, size_t attr_size,
const ir_op_ops *ops);
+/** Returns the ir_op_ops of an ir_op. */
+const ir_op_ops *get_op_ops(const ir_op *op);
+
return op->ops.generic;
}
return op->ops.generic;
}
+static INLINE const ir_op_ops *_get_op_ops(const ir_op *op) {
+ return &op->ops;
+}
+
#define get_op_code(op) _get_op_code(op)
#define get_op_ident(op) _get_op_ident(op)
#define get_op_pinned(op) _get_op_pinned(op)
#define get_op_code(op) _get_op_code(op)
#define get_op_ident(op) _get_op_ident(op)
#define get_op_pinned(op) _get_op_pinned(op)
+#define get_op_ops(op) _get_op_ops(op)