libFirm 1.20
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.
ir_nodenew_r_Const_long (ir_graph *irg, ir_mode *mode, long value)
 Constructor for a Const node.
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.
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.
int is_Const_all_one (const ir_node *node)
 Returns non-zero if the given Const node represents the constant with all bits set.
ir_nodenew_rd_Const (dbg_info *dbgi, ir_graph *irg, ir_tarval *tarval)
 Construct a Const node.
ir_nodenew_r_Const (ir_graph *irg, ir_tarval *tarval)
 Construct a Const node.
ir_nodenew_d_Const (dbg_info *dbgi, ir_tarval *tarval)
 Construct a Const node.
ir_nodenew_Const (ir_tarval *tarval)
 Construct a Const node.
int is_Const (const ir_node *node)
 Test if node is a Const.
ir_tarvalget_Const_tarval (const ir_node *node)
 Returns tarval attribute of a Const node.
void set_Const_tarval (ir_node *node, ir_tarval *tarval)
 Sets tarval attribute of a Const node.
ir_opget_op_Const (void)
 Returns opcode for Const nodes.

Variables

ir_opop_Const
 Const opcode.

Detailed Description

Returns a constant value.


Function Documentation

ir_tarval* get_Const_tarval ( const ir_node node)

Returns tarval attribute of a Const node.

ir_op* get_op_Const ( void  )

Returns opcode for Const nodes.

int is_Const ( const ir_node node)

Test if node is a Const.

Returns:
1 if the node is a Const node, 0 otherwise
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)
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)
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)
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.

Constructor for a Const node. The constant represents a target value. Sets the type information to type_unknown. (No more supported: If tv is entity derives a somehow useful type.)

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)
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.

Constructor for a Const node. The constant represents a target value. Sets the type information to type_unknown. (No more supported: If tv is entity derives a somehow useful type.)

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.


Variable Documentation

Const opcode.

Definition at line 174 of file opcodes.h.