gccint: Manipulating GIMPLE statements

1 
1 12.7 Manipulating GIMPLE statements
1 ===================================
1 
1 This section documents all the functions available to handle each of the
1 GIMPLE instructions.
1 
1 12.7.1 Common accessors
1 -----------------------
1 
1 The following are common accessors for gimple statements.
1 
1  -- GIMPLE function: enum gimple_code gimple_code (gimple g)
1      Return the code for statement 'G'.
1 
1  -- GIMPLE function: basic_block gimple_bb (gimple g)
1      Return the basic block to which statement 'G' belongs to.
1 
1  -- GIMPLE function: tree gimple_block (gimple g)
1      Return the lexical scope block holding statement 'G'.
1 
1  -- GIMPLE function: tree gimple_expr_type (gimple stmt)
1      Return the type of the main expression computed by 'STMT'.  Return
1      'void_type_node' if 'STMT' computes nothing.  This will only return
1      something meaningful for 'GIMPLE_ASSIGN', 'GIMPLE_COND' and
1      'GIMPLE_CALL'.  For all other tuple codes, it will return
1      'void_type_node'.
1 
1  -- GIMPLE function: enum tree_code gimple_expr_code (gimple stmt)
1      Return the tree code for the expression computed by 'STMT'.  This
1      is only meaningful for 'GIMPLE_CALL', 'GIMPLE_ASSIGN' and
1      'GIMPLE_COND'.  If 'STMT' is 'GIMPLE_CALL', it will return
1      'CALL_EXPR'.  For 'GIMPLE_COND', it returns the code of the
1      comparison predicate.  For 'GIMPLE_ASSIGN' it returns the code of
1      the operation performed by the 'RHS' of the assignment.
1 
1  -- GIMPLE function: void gimple_set_block (gimple g, tree block)
1      Set the lexical scope block of 'G' to 'BLOCK'.
1 
1  -- GIMPLE function: location_t gimple_locus (gimple g)
1      Return locus information for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_locus (gimple g, location_t locus)
1      Set locus information for statement 'G'.
1 
1  -- GIMPLE function: bool gimple_locus_empty_p (gimple g)
1      Return true if 'G' does not have locus information.
1 
1  -- GIMPLE function: bool gimple_no_warning_p (gimple stmt)
1      Return true if no warnings should be emitted for statement 'STMT'.
1 
1  -- GIMPLE function: void gimple_set_visited (gimple stmt, bool
1           visited_p)
1      Set the visited status on statement 'STMT' to 'VISITED_P'.
1 
1  -- GIMPLE function: bool gimple_visited_p (gimple stmt)
1      Return the visited status on statement 'STMT'.
1 
1  -- GIMPLE function: void gimple_set_plf (gimple stmt, enum plf_mask
1           plf, bool val_p)
1      Set pass local flag 'PLF' on statement 'STMT' to 'VAL_P'.
1 
1  -- GIMPLE function: unsigned int gimple_plf (gimple stmt, enum plf_mask
1           plf)
1      Return the value of pass local flag 'PLF' on statement 'STMT'.
1 
1  -- GIMPLE function: bool gimple_has_ops (gimple g)
1      Return true if statement 'G' has register or memory operands.
1 
1  -- GIMPLE function: bool gimple_has_mem_ops (gimple g)
1      Return true if statement 'G' has memory operands.
1 
1  -- GIMPLE function: unsigned gimple_num_ops (gimple g)
1      Return the number of operands for statement 'G'.
1 
1  -- GIMPLE function: tree * gimple_ops (gimple g)
1      Return the array of operands for statement 'G'.
1 
1  -- GIMPLE function: tree gimple_op (gimple g, unsigned i)
1      Return operand 'I' for statement 'G'.
1 
1  -- GIMPLE function: tree * gimple_op_ptr (gimple g, unsigned i)
1      Return a pointer to operand 'I' for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_op (gimple g, unsigned i, tree op)
1      Set operand 'I' of statement 'G' to 'OP'.
1 
1  -- GIMPLE function: bitmap gimple_addresses_taken (gimple stmt)
1      Return the set of symbols that have had their address taken by
1      'STMT'.
1 
1  -- GIMPLE function: struct def_optype_d * gimple_def_ops (gimple g)
1      Return the set of 'DEF' operands for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_def_ops (gimple g, struct
1           def_optype_d *def)
1      Set 'DEF' to be the set of 'DEF' operands for statement 'G'.
1 
1  -- GIMPLE function: struct use_optype_d * gimple_use_ops (gimple g)
1      Return the set of 'USE' operands for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_use_ops (gimple g, struct
1           use_optype_d *use)
1      Set 'USE' to be the set of 'USE' operands for statement 'G'.
1 
1  -- GIMPLE function: struct voptype_d * gimple_vuse_ops (gimple g)
1      Return the set of 'VUSE' operands for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_vuse_ops (gimple g, struct
1           voptype_d *ops)
1      Set 'OPS' to be the set of 'VUSE' operands for statement 'G'.
1 
1  -- GIMPLE function: struct voptype_d * gimple_vdef_ops (gimple g)
1      Return the set of 'VDEF' operands for statement 'G'.
1 
1  -- GIMPLE function: void gimple_set_vdef_ops (gimple g, struct
1           voptype_d *ops)
1      Set 'OPS' to be the set of 'VDEF' operands for statement 'G'.
1 
1  -- GIMPLE function: bitmap gimple_loaded_syms (gimple g)
1      Return the set of symbols loaded by statement 'G'.  Each element of
1      the set is the 'DECL_UID' of the corresponding symbol.
1 
1  -- GIMPLE function: bitmap gimple_stored_syms (gimple g)
1      Return the set of symbols stored by statement 'G'.  Each element of
1      the set is the 'DECL_UID' of the corresponding symbol.
1 
1  -- GIMPLE function: bool gimple_modified_p (gimple g)
1      Return true if statement 'G' has operands and the modified field
1      has been set.
1 
1  -- GIMPLE function: bool gimple_has_volatile_ops (gimple stmt)
1      Return true if statement 'STMT' contains volatile operands.
1 
1  -- GIMPLE function: void gimple_set_has_volatile_ops (gimple stmt, bool
1           volatilep)
1      Return true if statement 'STMT' contains volatile operands.
1 
1  -- GIMPLE function: void update_stmt (gimple s)
1      Mark statement 'S' as modified, and update it.
1 
1  -- GIMPLE function: void update_stmt_if_modified (gimple s)
1      Update statement 'S' if it has been marked modified.
1 
1  -- GIMPLE function: gimple gimple_copy (gimple stmt)
1      Return a deep copy of statement 'STMT'.
1