libFirm
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Add node

returns the sum of its operands More...

Enumerations

enum  n_Add { n_Add_left, n_Add_right, n_Add_max = n_Add_right }
 Input numbers for Add node. More...
 

Functions

ir_nodenew_rd_Add (dbg_info *dbgi, ir_node *block, ir_node *irn_left, ir_node *irn_right, ir_mode *mode)
 Construct an Add node. More...
 
ir_nodenew_r_Add (ir_node *block, ir_node *irn_left, ir_node *irn_right, ir_mode *mode)
 Construct an Add node. More...
 
ir_nodenew_d_Add (dbg_info *dbgi, ir_node *irn_left, ir_node *irn_right, ir_mode *mode)
 Construct an Add node. More...
 
ir_nodenew_Add (ir_node *irn_left, ir_node *irn_right, ir_mode *mode)
 Construct an Add node. More...
 
int is_Add (const ir_node *node)
 Test if node is a Add. More...
 
ir_nodeget_Add_left (const ir_node *node)
 Returns left input of an Add node. More...
 
void set_Add_left (ir_node *node, ir_node *left)
 Sets left input of an Add node. More...
 
ir_nodeget_Add_right (const ir_node *node)
 Returns right input of an Add node. More...
 
void set_Add_right (ir_node *node, ir_node *right)
 Sets right input of an Add node. More...
 
ir_opget_op_Add (void)
 Returns opcode for Add nodes. More...
 

Variables

ir_opop_Add
 Add opcode. More...
 

Detailed Description

returns the sum of its operands

Enumeration Type Documentation

enum n_Add

Input numbers for Add node.

Enumerator
n_Add_left 

first operand

n_Add_right 

second operand

n_Add_max 

Definition at line 175 of file nodes.h.

Function Documentation

ir_node* get_Add_left ( const ir_node node)

Returns left input of an Add node.

Definition at line 85 of file gen_irnode.c.

ir_node* get_Add_right ( const ir_node node)

Returns right input of an Add node.

Definition at line 95 of file gen_irnode.c.

ir_op* get_op_Add ( void  )

Returns opcode for Add nodes.

Definition at line 105 of file gen_irnode.c.

References op_Add.

int is_Add ( const ir_node node)

Test if node is a Add.

Returns
1 if the node is a Add node, 0 otherwise

Definition at line 2944 of file gen_irnode.c.

ir_node* new_Add ( ir_node irn_left,
ir_node irn_right,
ir_mode mode 
)

Construct an Add node.

Parameters
irn_leftleft
irn_rightright
modemode of the operations result

Definition at line 80 of file gen_irnode.c.

References new_d_Add().

ir_node* new_d_Add ( dbg_info dbgi,
ir_node irn_left,
ir_node irn_right,
ir_mode mode 
)

Construct an Add node.

Parameters
dbgiA pointer to debug information.
irn_leftleft
irn_rightright
modemode of the operations result

Definition at line 73 of file gen_irnode.c.

References current_ir_graph, get_cur_block(), IR_GRAPH_CONSTRAINT_CONSTRUCTION, irg_is_constrained(), and new_rd_Add().

Referenced by new_Add().

ir_node* new_r_Add ( ir_node block,
ir_node irn_left,
ir_node irn_right,
ir_mode mode 
)

Construct an Add node.

Parameters
blockThe IR block the node belongs to.
irn_leftleft
irn_rightright
modemode of the operations result

Definition at line 68 of file gen_irnode.c.

References new_rd_Add().

ir_node* new_rd_Add ( dbg_info dbgi,
ir_node block,
ir_node irn_left,
ir_node irn_right,
ir_mode mode 
)

Construct an Add node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_leftleft
irn_rightright
modemode of the operations result

Definition at line 52 of file gen_irnode.c.

References get_irn_irg(), new_ir_node(), op_Add, optimize_node(), and verify_new_node().

Referenced by new_d_Add(), and new_r_Add().

void set_Add_left ( ir_node node,
ir_node left 
)

Sets left input of an Add node.

Definition at line 90 of file gen_irnode.c.

void set_Add_right ( ir_node node,
ir_node right 
)

Sets right input of an Add node.

Definition at line 100 of file gen_irnode.c.

Variable Documentation

ir_op* op_Add

Add opcode.

Definition at line 236 of file nodes.h.

Referenced by get_op_Add(), and new_rd_Add().