12 #ifndef FIRM_IR_IROP_H 13 #define FIRM_IR_IROP_H 16 #include "firm_types.h" 294 unsigned pn_x_except);
void(* op_func)(void)
A generic function pointer type.
int(* verify_node_func)(const ir_node *node)
The verify_node operation.
void ir_op_set_memory_index(ir_op *op, int memory_index)
Sets memory input of operation using memory.
Set if the operation can change the control flow because of an exception.
void set_op_transform_node(ir_op *op, transform_node_func func)
Sets transform node callback func for operation op.
Forking control flow at this operation.
unsigned ir_get_n_opcodes(void)
Returns one more than the highest opcode code in use.
struct ir_op ir_op
Node Opcode.
ir_type *(* get_type_attr_func)(const ir_node *self)
The get_type_attr operation.
op_func get_generic_function_ptr(const ir_op *op)
Returns the generic function pointer from an IR operation.
ir_op * ir_get_opcode(unsigned code)
Returns the opcode with code code.
Dump node attributes to be shown in the label.
op_pin_state get_op_pinned(const ir_op *op)
Returns pinned state of an opcode.
op_arity
The allowed arities.
void set_op_attrs_equal(ir_op *op, node_attrs_equal_func func)
Sets attrs_equal callback func for operation op.
dump_reason_t
Reasons to call the dump_node operation:
struct ir_type ir_type
Type.
The opcode has a memory input/output but does not actually change the contents of any memory block kn...
int(* reassociate_func)(ir_node **n)
The reassociation operation.
irop_flags get_op_flags(const ir_op *op)
Returns the irop flags of an IR opcode.
This operation jumps to an unknown destination.
struct ir_tarval ir_tarval
Target Machine Value.
int(* verify_proj_node_func)(const ir_node *proj)
The verify_node operation for Proj(X).
void set_op_verify(ir_op *op, verify_node_func func)
Sets verify callback func for operation op.
Dump node attributes into info1.
node should be dumped outside any blocks
void set_op_transform_node_proj(ir_op *op, transform_node_func func)
Sets transform Proj node callback func for operation op.
This operation is a control flow operation.
op_pin_state
pinned states.
A binary operator – considering 'numeric' arguments.
const char * get_op_name(const ir_op *op)
Returns the string for the opcode.
void set_op_equivalent_node(ir_op *op, equivalent_node_func func)
Sets equivalent node callback func for operation op.
unsigned get_op_code(const ir_op *op)
Returns the enum for the opcode.
This operation is always placed in the Start block.
This operation is commutative.
This operation can be kept in End's keep-alive list.
void set_op_computed_value(ir_op *op, computed_value_func func)
Sets computed_value callback func for operation op.
This operation has a memory input and may change the memory state.
void set_op_get_entity_attr(ir_op *op, get_entity_attr_func func)
Sets get entity callback func for operation op.
unsigned get_next_ir_opcode(void)
Returns the next free IR opcode number, allows to register user ops.
void set_op_copy_attr(ir_op *op, copy_attr_func func)
Sets attribute copy callback func for operation op.
unsigned(* hash_func)(const ir_node *self)
The hash operation.
void set_op_verify_proj(ir_op *op, verify_proj_node_func func)
Sets proj verify callback func for operation op.
void set_op_hash(ir_op *op, hash_func func)
Sets hash callback func for operation op.
void set_generic_function_ptr(ir_op *op, op_func func)
Stores a generic function pointer into an IR operation.
The arity is not fixed by opcode, but statically known.
const char * get_op_pin_state_name(op_pin_state s)
Returns a human readable name of an op_pin_state.
ir_node *(* transform_node_func)(ir_node *self)
The transform node operation.
void(* dump_node_func)(FILE *out, const ir_node *self, dump_reason_t reason)
The dump_node operation.
void set_op_computed_value_proj(ir_op *op, computed_value_func func)
Sets compute_value for Proj callback func for operation op.
void(* copy_attr_func)(ir_graph *irg, const ir_node *old_node, ir_node *new_node)
The copy attribute operation.
ir_op * new_ir_op(unsigned code, const char *name, op_pin_state p, irop_flags flags, op_arity opar, int op_index, size_t attr_size)
Creates a new IR operation.
void set_op_get_type_attr(ir_op *op, get_type_attr_func func)
Sets get type callback func for operation op.
void ir_clear_opcodes_generic_func(void)
Sets the generic function pointer of all opcodes to NULL.
This operation has no arguments and is some kind of a constant.
ir_node *(* equivalent_node_func)(ir_node *self)
The equivalent node operation.
ir_tarval *(* computed_value_func)(const ir_node *self)
The compute value operation.
irop_flags
The irop flags.
unsigned get_next_ir_opcodes(unsigned num)
Returns the next free n IR opcode number, allows to register a bunch of user ops. ...
void set_op_dump(ir_op *op, dump_node_func func)
Sets dump callback func for operation op.
The arity depends on state of Firm representation.
struct ir_entity ir_entity
Entity.
struct ir_node ir_node
Procedure Graph Node.
void set_op_equivalent_node_proj(ir_op *op, equivalent_node_func func)
Sets equivalent Proj node callback func for operation op.
ir_entity *(* get_entity_attr_func)(const ir_node *self)
The get_entity_attr operation.
void free_ir_op(ir_op *code)
Frees an ir operation.
struct ir_graph ir_graph
Procedure Graph.
void set_op_reassociate(ir_op *op, reassociate_func func)
Sets reassociation callback func for operation op.
int(* node_attrs_equal_func)(const ir_node *a, const ir_node *b)
The node attribute compare operation.
void ir_op_set_fragile_indices(ir_op *op, unsigned pn_x_regular, unsigned pn_x_except)
Sets proj-number for X_regular and X_except projs of fragile nodes.