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

Returns a constant value. More...

Functions

ir_nodenew_rd_Const_long (dbg_info *db, ir_graph *irg, ir_mode *mode, long value)
 Constructor for a Const node. More...
 
ir_nodenew_r_Const_long (ir_graph *irg, ir_mode *mode, long value)
 Constructor for a Const node. More...
 
ir_nodenew_d_Const_long (dbg_info *db, ir_mode *mode, long value)
 
ir_nodenew_Const_long (ir_mode *mode, long value)
 Make a const from a long. More...
 
int is_Const_null (const ir_node *node)
 Returns non-zero if the given Const node represents the 0 constant. More...
 
int is_Const_one (const ir_node *node)
 Returns non-zero if the given Const node represents the 1 constant. More...
 
int is_Const_all_one (const ir_node *node)
 Returns non-zero if the given Const node represents the constant with all bits set. More...
 
ir_nodenew_rd_Const (dbg_info *dbgi, ir_graph *irg, ir_tarval *tarval)
 Construct a Const node. More...
 
ir_nodenew_r_Const (ir_graph *irg, ir_tarval *tarval)
 Construct a Const node. More...
 
ir_nodenew_d_Const (dbg_info *dbgi, ir_tarval *tarval)
 Construct a Const node. More...
 
ir_nodenew_Const (ir_tarval *tarval)
 Construct a Const node. More...
 
int is_Const (const ir_node *node)
 Test if node is a Const. More...
 
ir_tarvalget_Const_tarval (const ir_node *node)
 Returns tarval attribute of a Const node. More...
 
void set_Const_tarval (ir_node *node, ir_tarval *tarval)
 Sets tarval attribute of a Const node. More...
 
ir_opget_op_Const (void)
 Returns opcode for Const nodes. More...
 

Variables

ir_opop_Const
 Const opcode. More...
 

Detailed Description

Returns a constant value.

Function Documentation

ir_tarval* get_Const_tarval ( const ir_node node)

Returns tarval attribute of a Const node.

Definition at line 3110 of file gen_irnode.c.

ir_op* get_op_Const ( void  )

Returns opcode for Const nodes.

Definition at line 889 of file gen_irnode.c.

References op_Const.

int is_Const ( const ir_node node)

Test if node is a Const.

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

Definition at line 3105 of file gen_irnode.c.

int is_Const_all_one ( const ir_node node)

Returns non-zero if the given Const node represents the constant with all bits set.

int is_Const_null ( const ir_node node)

Returns non-zero if the given Const node represents the 0 constant.

int is_Const_one ( const ir_node node)

Returns non-zero if the given Const node represents the 1 constant.

ir_node* new_Const ( ir_tarval tarval)

Construct a Const node.

Parameters
tarvalconstant value (a tarval object)

Definition at line 884 of file gen_irnode.c.

References new_d_Const().

ir_node* new_Const_long ( ir_mode mode,
long  value 
)

Make a const from a long.

This is just convenience for the usual new_Const(mode, tarval_from_long(mode, ...)) pain.

Parameters
modeThe mode for the const.
valueThe value of the constant.
Returns
A new const node.
ir_node* new_d_Const ( dbg_info dbgi,
ir_tarval tarval 
)

Construct a Const node.

Parameters
dbgiA pointer to debug information.
tarvalconstant value (a tarval object)

Definition at line 877 of file gen_irnode.c.

References current_ir_graph, IR_GRAPH_CONSTRAINT_CONSTRUCTION, irg_is_constrained(), and new_rd_Const().

Referenced by new_Const().

ir_node* new_d_Const_long ( dbg_info db,
ir_mode mode,
long  value 
)
See Also
new_rd_Const_long()
Parameters
dbA pointer for debug information.
modeThe mode of the operands and results.
valueA value from which the tarval is made.
ir_node* new_r_Const ( ir_graph irg,
ir_tarval tarval 
)

Construct a Const node.

Parameters
irgThe IR graph the node belongs to.
tarvalconstant value (a tarval object)

Definition at line 872 of file gen_irnode.c.

References new_rd_Const().

ir_node* new_r_Const_long ( ir_graph irg,
ir_mode mode,
long  value 
)

Constructor for a Const node.

Adds the node to the start block.

The constant represents a target value.

Parameters
irgThe IR graph the node belongs to.
modeThe mode of the operands and the results.
valueA value from which the tarval is made.
ir_node* new_rd_Const ( dbg_info dbgi,
ir_graph irg,
ir_tarval tarval 
)

Construct a Const node.

Parameters
dbgiA pointer to debug information.
irgThe IR graph the node belongs to.
tarvalconstant value (a tarval object)

Definition at line 858 of file gen_irnode.c.

References get_irg_start_block(), get_tarval_mode(), new_ir_node(), op_Const, optimize_node(), and verify_new_node().

Referenced by new_d_Const(), and new_r_Const().

ir_node* new_rd_Const_long ( dbg_info db,
ir_graph irg,
ir_mode mode,
long  value 
)

Constructor for a Const node.

Adds the node to the start block.

The constant represents a target value.

Parameters
dbA pointer for debug information.
irgThe IR graph the node belongs to.
modeThe mode of the operands and results.
valueA value from which the tarval is made.
void set_Const_tarval ( ir_node node,
ir_tarval tarval 
)

Sets tarval attribute of a Const node.

Definition at line 3115 of file gen_irnode.c.

Variable Documentation

ir_op* op_Const

Const opcode.

Definition at line 1341 of file nodes.h.

Referenced by get_op_Const(), and new_rd_Const().