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