Manipulating GIMPLE statements#
This section documents all the functions available to handle each of the GIMPLE instructions.
Common accessors#
The following are common accessors for gimple statements.
-
enum gimple_code gimple_code(gimple g)#
Return the code for statement
G.
-
basic_block gimple_bb(gimple g)#
Return the basic block to which statement
Gbelongs to.
-
tree gimple_block(gimple g)#
Return the lexical scope block holding statement
G.
-
enum tree_code gimple_expr_code(gimple stmt)#
Return the tree code for the expression computed by
STMT. This is only meaningful forGIMPLE_CALL,GIMPLE_ASSIGNandGIMPLE_COND. IfSTMTisGIMPLE_CALL, it will returnCALL_EXPR. ForGIMPLE_COND, it returns the code of the comparison predicate. ForGIMPLE_ASSIGNit returns the code of the operation performed by theRHSof the assignment.
-
void gimple_set_block(gimple g, tree block)#
Set the lexical scope block of
GtoBLOCK.
-
location_t gimple_locus(gimple g)#
Return locus information for statement
G.
-
void gimple_set_locus(gimple g, location_t locus)#
Set locus information for statement
G.
-
bool gimple_locus_empty_p(gimple g)#
Return true if
Gdoes not have locus information.
-
bool gimple_no_warning_p(gimple stmt)#
Return true if no warnings should be emitted for statement
STMT.
-
void gimple_set_visited(gimple stmt, bool visited_p)#
Set the visited status on statement
STMTtoVISITED_P.
-
bool gimple_visited_p(gimple stmt)#
Return the visited status on statement
STMT.
-
void gimple_set_plf(gimple stmt, enum plf_mask plf, bool val_p)#
Set pass local flag
PLFon statementSTMTtoVAL_P.
-
unsigned int gimple_plf(gimple stmt, enum plf_mask plf)#
Return the value of pass local flag
PLFon statementSTMT.
-
bool gimple_has_ops(gimple g)#
Return true if statement
Ghas register or memory operands.
-
bool gimple_has_mem_ops(gimple g)#
Return true if statement
Ghas memory operands.
-
unsigned gimple_num_ops(gimple g)#
Return the number of operands for statement
G.
-
tree *gimple_ops(gimple g)#
Return the array of operands for statement
G.
-
tree gimple_op(gimple g, unsigned i)#
Return operand
Ifor statementG.
-
tree *gimple_op_ptr(gimple g, unsigned i)#
Return a pointer to operand
Ifor statementG.
-
void gimple_set_op(gimple g, unsigned i, tree op)#
Set operand
Iof statementGtoOP.
-
bitmap gimple_addresses_taken(gimple stmt)#
Return the set of symbols that have had their address taken by
STMT.
-
struct def_optype_d *gimple_def_ops(gimple g)#
Return the set of
DEFoperands for statementG.
-
void gimple_set_def_ops(gimple g, struct def_optype_d *def)#
Set
DEFto be the set ofDEFoperands for statementG.
-
struct use_optype_d *gimple_use_ops(gimple g)#
Return the set of
USEoperands for statementG.
-
void gimple_set_use_ops(gimple g, struct use_optype_d *use)#
Set
USEto be the set ofUSEoperands for statementG.
-
struct voptype_d *gimple_vuse_ops(gimple g)#
Return the set of
VUSEoperands for statementG.
-
void gimple_set_vuse_ops(gimple g, struct voptype_d *ops)#
Set
OPSto be the set ofVUSEoperands for statementG.
-
struct voptype_d *gimple_vdef_ops(gimple g)#
Return the set of
VDEFoperands for statementG.
-
void gimple_set_vdef_ops(gimple g, struct voptype_d *ops)#
Set
OPSto be the set ofVDEFoperands for statementG.
-
bitmap gimple_loaded_syms(gimple g)#
Return the set of symbols loaded by statement
G. Each element of the set is theDECL_UIDof the corresponding symbol.
-
bitmap gimple_stored_syms(gimple g)#
Return the set of symbols stored by statement
G. Each element of the set is theDECL_UIDof the corresponding symbol.
-
bool gimple_modified_p(gimple g)#
Return true if statement
Ghas operands and the modified field has been set.
-
bool gimple_has_volatile_ops(gimple stmt)#
Return true if statement
STMTcontains volatile operands.
-
void gimple_set_has_volatile_ops(gimple stmt, bool volatilep)#
Return true if statement
STMTcontains volatile operands.
-
void update_stmt(gimple s)#
Mark statement
Sas modified, and update it.
-
void update_stmt_if_modified(gimple s)#
Update statement
Sif it has been marked modified.
-
gimple gimple_copy(gimple stmt)#
Return a deep copy of statement
STMT.