libFirm
Loading...
Searching...
No Matches
Const node

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

◆ get_Const_tarval()

ir_tarval * get_Const_tarval ( const ir_node * node)

Returns tarval attribute of a Const node.

◆ get_op_Const()

ir_op * get_op_Const ( void )

Returns opcode for Const nodes.

◆ is_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

◆ is_Const_all_one()

int is_Const_all_one ( const ir_node * node)

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

◆ is_Const_null()

int is_Const_null ( const ir_node * node)

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

◆ is_Const_one()

int is_Const_one ( const ir_node * node)

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

◆ new_Const()

ir_node * new_Const ( ir_tarval * tarval)

Construct a Const node.

Parameters
tarvalconstant value (a tarval object)

◆ new_Const_long()

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.

◆ new_d_Const()

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)

◆ new_d_Const_long()

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.

◆ new_r_Const()

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)

◆ new_r_Const_long()

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.

◆ new_rd_Const()

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)

◆ new_rd_Const_long()

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.

◆ set_Const_tarval()

void set_Const_tarval ( ir_node * node,
ir_tarval * tarval )

Sets tarval attribute of a Const node.

Variable Documentation

◆ op_Const

ir_op* op_Const

Const opcode.

Definition at line 1408 of file nodes.h.