11 #ifndef FIRM_IR_IRNODE_H 12 #define FIRM_IR_IRNODE_H 16 #include "firm_common.h" 143 int arity,
ir_node *
const *in);
ir_relation get_inversed_relation(ir_relation relation)
Calculates the inversed (R^-1) relation, i.e., "<" –> ">".
void set_Block_block_visited(ir_node *block, ir_visited_t visit)
set block visited flag
void ir_switch_table_set(ir_switch_table *table, size_t entry, ir_tarval *min, ir_tarval *max, unsigned pn)
Sets entry number entry in the switch table table.
void set_irn_n(ir_node *node, int n, ir_node *in)
Replaces the n-th predecessor of a node with a new one.
unsigned get_irn_opcode(const ir_node *node)
Returns the opcode-enum of the node.
void set_irn_dbg_info(ir_node *n, dbg_info *db)
Sets the debug information of a node.
void ir_set_throws_exception(ir_node *node, int throws_exception)
Sets throws exception attribute of a fragile node throws_exception must be 0 or 1.
const char ident
Identifier.
ir_graph * get_irn_irg(const ir_node *node)
Returns the ir_graph this node belongs to.
ir_node * get_irn_n(const ir_node *node, int n)
Returns the n-th predecessor of a node.
int irn_visited_else_mark(ir_node *node)
Returns 1 if visited >= get_irg_visited(get_irn_irg(node)).
void free_End(ir_node *end)
Some parts of the End node are allocated separately – their memory is not recovered by dead_node_eli...
ir_node * skip_Proj(ir_node *node)
Returns operand of node if node is a Proj.
int is_irn_keep(const ir_node *node)
Returns non-zero for nodes that are allowed to have keep-alives and are neither Block nor PhiM...
ident * get_irn_opident(const ir_node *node)
Returns the ident for a string representation of the opcode.
ir_node * get_Block_cfgpred_block(const ir_node *node, int pos)
Returns the predecessor block.
ir_node * skip_Confirm(ir_node *node)
Returns operand of node if node is a Confirm.
ir_entity * create_Block_entity(ir_node *block)
Returns the entity for a Block (creating it if necessary)
int get_irn_arity(const ir_node *node)
Returns the number of predecessors without the block predecessor.
void add_Sync_pred(ir_node *node, ir_node *pred)
Adds pred to predecessor list of Sync node node.
struct ir_op ir_op
Node Opcode.
ir_node * get_memop_mem(const ir_node *node)
Returns the memory input of a memory operation.
void set_Block_matured(ir_node *block, int matured)
set the matured flag of a block.
ir_node * skip_Id(ir_node *node)
Returns operand of node if node is a Id.
ir_switch_table * ir_new_switch_table(ir_graph *irg, size_t n_entries)
Creates a new switch_table data structure with n_entries entries.
void set_irn_visited(ir_node *node, ir_visited_t visited)
Sets the visited counter of a node.
void set_memop_mem(ir_node *node, ir_node *mem)
Sets the memory input of a memory operation.
int is_fragile_op(const ir_node *node)
Returns true if the operation can change the control flow because of an exception: Call...
const char * get_relation_string(ir_relation relation)
Returns the name of an ir_relation.
void add_End_keepalive(ir_node *end, ir_node *ka)
Keep alive dedicated nodes.
int irn_visited(const ir_node *node)
Returns 1 if visited >= get_irg_visited(get_irn_irg(node)).
unsigned get_irn_idx(const ir_node *node)
Returns the unique node index for the node in its graph.
void mark_Block_block_visited(ir_node *node)
Marks a block as visited by setting its visited counter.
const char * gdb_node_helper(const void *firm_object)
Returns a descriptive name of a node (containing type+number)
size_t ir_switch_table_get_n_entries(const ir_switch_table *table)
Returns number of entries available in switch table table.
int is_irn_forking(const ir_node *node)
Returns true if the operation is a forking control flow operation: Cond.
struct ir_type ir_type
Type.
struct dbg_info dbg_info
Source Reference.
void * get_irn_generic_attr(ir_node *node)
Returns a pointer to the node attributes.
int get_Block_matured(const ir_node *block)
Returns the matured flag of a block.
int is_Const_null(const ir_node *node)
Returns non-zero if the given Const node represents the 0 constant.
ir_type * get_irn_type_attr(ir_node *n)
Returns the type attribute of a node n (TypeConst, Call, Alloc, Free) or NULL.
void set_irn_in(ir_node *node, int arity, ir_node *const in[])
Replaces the old in array by a new one that will contain the ins given in the parameters.
ir_node * get_binop_left(const ir_node *node)
Returns left operand of binary operation node.
int is_irn_constlike(const ir_node *node)
Returns non-zero for constant-like nodes.
const char * get_irn_opname(const ir_node *node)
Returns the string representation of the opcode.
ir_relation get_negated_relation(ir_relation relation)
Calculates the negated (Complement(R)) relation, i.e.
void set_nodes_block(ir_node *node, ir_node *block)
Sets the Block of a node.
void * get_irn_link(const ir_node *node)
Returns the link of a node.
struct ir_tarval ir_tarval
Target Machine Value.
int add_irn_n(ir_node *node, ir_node *in)
Appends a new predecessor to a node.
ir_op * get_irn_op(const ir_node *node)
Returns the opcode struct of the node.
int Block_block_visited(const ir_node *node)
Returns 1 if a block is marked as visited.
ir_entity * get_Call_callee(const ir_node *call)
Convenience function: Return method that will be called by a call.
void set_Block_phis(ir_node *block, ir_node *phi)
Sets the head of the Phi list for this block.
int is_memop(const ir_node *node)
Returns true if node is a memory operation.
long get_irn_node_nr(const ir_node *node)
Outputs a unique number for this node if libFIRM is compiled for debugging, (configure with –enable-...
ir_node * skip_Pin(ir_node *node)
Returns operand of node if node is a Pin.
void copy_node_attr(ir_graph *irg, const ir_node *old_node, ir_node *new_node)
Copies attributes stored in the old node to a new node.
void set_Block_mark(ir_node *block, unsigned mark)
Sets the Block mark (single bit).
void add_Block_phi(ir_node *block, ir_node *phi)
Add a Phi node to the list of Block Phi's.
ir_node * new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mode, int arity, ir_node *const *in)
IR node constructor.
ir_entity * get_irn_entity_attr(ir_node *n)
Returns the entity attribute of a node n (Address, Offset, Sel) or NULL.
const char * get_cond_jmp_predicate_name(cond_jmp_predicate pred)
Returns the string representation of the jump prediction.
void set_irn_mode(ir_node *node, ir_mode *mode)
Sets the mode struct of node.
ir_visited_t get_Block_block_visited(const ir_node *block)
A visited flag only for block nodes.
const void * get_irn_generic_attr_const(const ir_node *node)
Returns a pointer to the node attributes.
struct ir_switch_table ir_switch_table
A switch table mapping integer numbers to proj-numbers of a Switch-node.
int is_unknown_jump(const ir_node *node)
Returns true if the operation jumps to an unknown destination.
ir_tarval * ir_switch_table_get_min(const ir_switch_table *table, size_t entry)
Returns minimum tarval value of switch table entry entry.
void set_irn_pinned(ir_node *node, int pinned)
Sets pin state for nodes with op pin state op_pin_state_exc_pinned.
unsigned ir_switch_table_get_pn(const ir_switch_table *table, size_t entry)
Returns proj number taken if switch table entry entry matches.
ir_tarval * ir_switch_table_get_max(const ir_switch_table *table, size_t entry)
Returns maximum tarval value of switch table entry entry.
int is_x_regular_Proj(const ir_node *node)
Tests whether a node is the X_regular Proj of a fragile operation.
ir_builtin_kind
Supported libFirm builtins.
ir_switch_table * ir_switch_table_duplicate(ir_graph *irg, const ir_switch_table *table)
Duplicates switch table table on obstack of irg.
int is_Const_one(const ir_node *node)
Returns non-zero if the given Const node represents the 1 constant.
void remove_End_keepalive(ir_node *end, const ir_node *irn)
Removes irn from the keep-alive set.
void remove_End_n(ir_node *end, int idx)
Removes predecessor (a keepalive) at index idx from End node end.
void set_End_keepalives(ir_node *end, int n, ir_node *in[])
Sets new keep-alives.
void set_binop_left(ir_node *node, ir_node *left)
Sets left operand of binary operation node.
void remove_Sync_n(ir_node *n, int i)
Removes predecessor i from Sync n.
ir_node * get_nodes_block(const ir_node *node)
Returns the block the node belongs to.
int get_irn_pinned(const ir_node *node)
Returns whether a node is pinned.
const char * get_builtin_kind_name(ir_builtin_kind kind)
Returns a human readable string for the ir_builtin_kind.
ir_relation
Relations for comparing numbers.
cond_jmp_predicate
A type to express conditional jump predictions.
ir_visited_t get_irn_visited(const ir_node *node)
Returns the visited counter of a node.
void set_irn_link(ir_node *node, void *link)
Sets the link of a node.
size_t get_ASM_n_output_constraints(const ir_node *node)
Returns the number of output constraints for an ASM node.
int is_Const_all_one(const ir_node *node)
Returns non-zero if the given Const node represents the constant with all bits set.
struct ir_mode ir_mode
SSA Value mode.
void remove_End_Bads_and_doublets(ir_node *end)
Removes Bads, NoMem and doublets from the keep-alive set.
void set_Phi_next(ir_node *phi, ir_node *next)
Sets the next link of a block Phi list.
unsigned get_Block_mark(const ir_node *block)
Returns the Block mark (single bit).
int is_irn_start_block_placed(const ir_node *node)
Returns non-zero for nodes that are always placed in the start block.
ir_node * get_Block_phis(const ir_node *block)
Returns the head of the Phi list for this block.
int is_irn_const_memory(const ir_node *node)
Returns true if the operation does not change anymemory contents although it has a memory input/outpu...
size_t get_ASM_n_clobbers(const ir_node *node)
Returns the number of clobbered registers for an ASM node.
ir_mode * get_irn_mode(const ir_node *node)
Returns the mode struct of a node.
dbg_info * get_irn_dbg_info(const ir_node *n)
Returns the debug information of an node.
void set_binop_right(ir_node *node, ir_node *right)
Sets right operand of binary operation node.
struct ir_entity ir_entity
Entity.
struct ir_node ir_node
Procedure Graph Node.
ir_node * get_Phi_next(const ir_node *phi)
Returns the next element of a block phi list.
int ir_throws_exception(const ir_node *node)
Returns throws_exception attribute of a fragile node.
struct ir_graph ir_graph
Procedure Graph.
const ir_node * skip_Proj_const(const ir_node *node)
Returns operand of node if node is a Proj.
int is_x_except_Proj(const ir_node *node)
Tests whether a node is the X_except Proj of a fragile operation.
int is_cfop(const ir_node *node)
Returns true if the operation manipulates control flow.
ir_node * get_binop_right(const ir_node *node)
Returns rights operand of binary operation node.
void mark_irn_visited(ir_node *node)
Sets visited to get_irg_visited(get_irn_irg(node)).
ir_node * skip_Tuple(ir_node *node)
Returns corresponding operand of Tuple if node is a Proj from a Tuple.