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

returns the false or true operand depending on the value of the sel operand More...

Enumerations

enum  n_Mux { n_Mux_sel, n_Mux_false, n_Mux_true, n_Mux_max = n_Mux_true }
 Input numbers for Mux node. More...
 

Functions

ir_nodenew_rd_Mux (dbg_info *dbgi, ir_node *block, ir_node *irn_sel, ir_node *irn_false, ir_node *irn_true, ir_mode *mode)
 Construct a Mux node. More...
 
ir_nodenew_r_Mux (ir_node *block, ir_node *irn_sel, ir_node *irn_false, ir_node *irn_true, ir_mode *mode)
 Construct a Mux node. More...
 
ir_nodenew_d_Mux (dbg_info *dbgi, ir_node *irn_sel, ir_node *irn_false, ir_node *irn_true, ir_mode *mode)
 Construct a Mux node. More...
 
ir_nodenew_Mux (ir_node *irn_sel, ir_node *irn_false, ir_node *irn_true, ir_mode *mode)
 Construct a Mux node. More...
 
int is_Mux (const ir_node *node)
 Test if node is a Mux. More...
 
ir_nodeget_Mux_sel (const ir_node *node)
 Returns sel input of a Mux node. More...
 
void set_Mux_sel (ir_node *node, ir_node *sel)
 Sets sel input of a Mux node. More...
 
ir_nodeget_Mux_false (const ir_node *node)
 Returns false input of a Mux node. More...
 
void set_Mux_false (ir_node *node, ir_node *false_)
 Sets false input of a Mux node. More...
 
ir_nodeget_Mux_true (const ir_node *node)
 Returns true input of a Mux node. More...
 
void set_Mux_true (ir_node *node, ir_node *true_)
 Sets true input of a Mux node. More...
 
ir_opget_op_Mux (void)
 Returns opcode for Mux nodes. More...
 

Variables

ir_opop_Mux
 Mux opcode. More...
 

Detailed Description

returns the false or true operand depending on the value of the sel operand

Enumeration Type Documentation

enum n_Mux

Input numbers for Mux node.

Enumerator
n_Mux_sel 

value making the output selection

n_Mux_false 

selected if sel input is false

n_Mux_true 

selected if sel input is true

n_Mux_max 

Definition at line 2629 of file nodes.h.

Function Documentation

ir_node* get_Mux_false ( const ir_node node)

Returns false input of a Mux node.

Definition at line 1784 of file gen_irnode.c.

ir_node* get_Mux_sel ( const ir_node node)

Returns sel input of a Mux node.

Definition at line 1774 of file gen_irnode.c.

ir_node* get_Mux_true ( const ir_node node)

Returns true input of a Mux node.

Definition at line 1794 of file gen_irnode.c.

ir_op* get_op_Mux ( void  )

Returns opcode for Mux nodes.

Definition at line 1804 of file gen_irnode.c.

References op_Mux.

int is_Mux ( const ir_node node)

Test if node is a Mux.

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

Definition at line 3314 of file gen_irnode.c.

ir_node* new_d_Mux ( dbg_info dbgi,
ir_node irn_sel,
ir_node irn_false,
ir_node irn_true,
ir_mode mode 
)

Construct a Mux node.

Parameters
dbgiA pointer to debug information.
irn_selsel
irn_falsefalse
irn_truetrue
modemode of the operations result

Definition at line 1762 of file gen_irnode.c.

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

Referenced by new_Mux().

ir_node* new_Mux ( ir_node irn_sel,
ir_node irn_false,
ir_node irn_true,
ir_mode mode 
)

Construct a Mux node.

Parameters
irn_selsel
irn_falsefalse
irn_truetrue
modemode of the operations result

Definition at line 1769 of file gen_irnode.c.

References new_d_Mux().

ir_node* new_r_Mux ( ir_node block,
ir_node irn_sel,
ir_node irn_false,
ir_node irn_true,
ir_mode mode 
)

Construct a Mux node.

Parameters
blockThe IR block the node belongs to.
irn_selsel
irn_falsefalse
irn_truetrue
modemode of the operations result

Definition at line 1757 of file gen_irnode.c.

References new_rd_Mux().

ir_node* new_rd_Mux ( dbg_info dbgi,
ir_node block,
ir_node irn_sel,
ir_node irn_false,
ir_node irn_true,
ir_mode mode 
)

Construct a Mux node.

Parameters
dbgiA pointer to debug information.
blockThe IR block the node belongs to.
irn_selsel
irn_falsefalse
irn_truetrue
modemode of the operations result

Definition at line 1740 of file gen_irnode.c.

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

Referenced by new_d_Mux(), and new_r_Mux().

void set_Mux_false ( ir_node node,
ir_node false_ 
)

Sets false input of a Mux node.

Definition at line 1789 of file gen_irnode.c.

void set_Mux_sel ( ir_node node,
ir_node sel 
)

Sets sel input of a Mux node.

Definition at line 1779 of file gen_irnode.c.

void set_Mux_true ( ir_node node,
ir_node true_ 
)

Sets true input of a Mux node.

Definition at line 1799 of file gen_irnode.c.

Variable Documentation

ir_op* op_Mux

Mux opcode.

Definition at line 2699 of file nodes.h.

Referenced by get_op_Mux(), and new_rd_Mux().