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