GCC Middle and Back End API Reference
operands_scanner Class Reference
Collaboration diagram for operands_scanner:

Public Member Functions

 operands_scanner (struct function *fun, gimple *statement)
 
void build_ssa_operands ()
 
DEBUG_FUNCTION bool verify_ssa_operands ()
 

Private Member Functions

 DISABLE_COPY_AND_ASSIGN (operands_scanner)
 
void finalize_ssa_uses ()
 
void cleanup_build_arrays ()
 
void finalize_ssa_stmt_operands ()
 
void start_ssa_stmt_operands ()
 
void append_use (tree *use_p)
 
void append_vdef (tree var)
 
void append_vuse (tree var)
 
void add_virtual_operand (int flags)
 
void add_stmt_operand (tree *var_p, int flags)
 
void get_mem_ref_operands (tree expr, int flags)
 
void get_tmr_operands (tree expr, int flags)
 
void maybe_add_call_vops (gcall *stmt)
 
void get_asm_stmt_operands (gasm *stmt)
 
void get_expr_operands (tree *expr_p, int flags)
 
void parse_ssa_operands ()
 
void finalize_ssa_defs ()
 

Private Attributes

auto_vec< tree *, 16 > build_uses
 
tree build_vdef
 
tree build_vuse
 
struct functionfn
 
gimplestmt
 

Detailed Description

Class containing temporary per-stmt state.   

Constructor & Destructor Documentation

◆ operands_scanner()

operands_scanner::operands_scanner ( struct function * fun,
gimple * statement )
inline

Member Function Documentation

◆ add_stmt_operand()

void operands_scanner::add_stmt_operand ( tree * var_p,
int flags )
private
Add *VAR_P to the appropriate operand array for statement STMT.
FLAGS is as in get_expr_operands.  If *VAR_P is a GIMPLE register,
it will be added to the statement's real operands, otherwise it is
added to virtual operands.   

References add_virtual_operand(), append_use(), DECL_P, fn, gcc_assert, ggc_alloc(), function::gimple_df, gimple_set_has_volatile_ops(), is_gimple_reg(), opf_def, opf_no_vops, gimple_df::ssa_renaming_needed, SSA_VAR_P, stmt, TREE_CODE, and TREE_THIS_VOLATILE.

Referenced by get_expr_operands().

◆ add_virtual_operand()

void operands_scanner::add_virtual_operand ( int flags)
private

◆ append_use()

void operands_scanner::append_use ( tree * use_p)
inlineprivate
Add USE_P to the list of pointers to operands.   

References build_uses, and ggc_alloc().

Referenced by add_stmt_operand().

◆ append_vdef()

void operands_scanner::append_vdef ( tree var)
inlineprivate
Add VAR to the set of variables that require a VDEF operator.   

References build_vdef, build_vuse, gcc_assert, and NULL_TREE.

Referenced by add_virtual_operand().

◆ append_vuse()

void operands_scanner::append_vuse ( tree var)
inlineprivate
Add VAR to the set of variables that require a VUSE operator.   

References build_vuse, gcc_assert, and NULL_TREE.

Referenced by add_virtual_operand(), and parse_ssa_operands().

◆ build_ssa_operands()

void operands_scanner::build_ssa_operands ( )

◆ cleanup_build_arrays()

void operands_scanner::cleanup_build_arrays ( )
inlineprivate
Clear the in_list bits and empty the build array for VDEFs and
VUSEs.   

References build_uses, build_vdef, build_vuse, and NULL_TREE.

Referenced by finalize_ssa_stmt_operands(), and verify_ssa_operands().

◆ DISABLE_COPY_AND_ASSIGN()

operands_scanner::DISABLE_COPY_AND_ASSIGN ( operands_scanner )
private

◆ finalize_ssa_defs()

void operands_scanner::finalize_ssa_defs ( )
inlineprivate
Takes elements from build_defs and turns them into def operands of STMT.
TODO -- Make build_defs vec of tree *.   

References build_vdef, fn, ggc_alloc(), function::gimple_df, gimple_set_vdef(), gimple_vdef(), NULL_TREE, release_ssa_name_fn(), gimple_df::rename_vops, SSA_NAME_VAR, gimple_df::ssa_renaming_needed, stmt, TREE_CODE, and unlink_stmt_vdef().

Referenced by finalize_ssa_stmt_operands().

◆ finalize_ssa_stmt_operands()

void operands_scanner::finalize_ssa_stmt_operands ( )
inlineprivate
Finalize all the build vectors, fill the new ones into INFO.   

References cleanup_build_arrays(), finalize_ssa_defs(), and finalize_ssa_uses().

Referenced by build_ssa_operands().

◆ finalize_ssa_uses()

◆ get_asm_stmt_operands()

◆ get_expr_operands()

◆ get_mem_ref_operands()

void operands_scanner::get_mem_ref_operands ( tree expr,
int flags )
private
A subroutine of get_expr_operands to handle MEM_REF.

STMT is the statement being processed, EXPR is the MEM_REF
   that got us here.

FLAGS is as in get_expr_operands.   

References add_virtual_operand(), get_expr_operands(), ggc_alloc(), gimple_set_has_volatile_ops(), opf_no_vops, opf_non_addressable, opf_not_non_addressable, opf_use, stmt, TREE_OPERAND, and TREE_THIS_VOLATILE.

Referenced by get_expr_operands().

◆ get_tmr_operands()

void operands_scanner::get_tmr_operands ( tree expr,
int flags )
private

◆ maybe_add_call_vops()

void operands_scanner::maybe_add_call_vops ( gcall * stmt)
private
If STMT is a call that may clobber globals and other symbols that
escape, add them to the VDEF/VUSE lists for it.   

References add_virtual_operand(), ECF_CONST, ECF_NOVOPS, ECF_PURE, ggc_alloc(), gimple_call_flags(), opf_def, opf_use, and stmt.

Referenced by parse_ssa_operands().

◆ parse_ssa_operands()

void operands_scanner::parse_ssa_operands ( )
private

◆ start_ssa_stmt_operands()

void operands_scanner::start_ssa_stmt_operands ( )
inlineprivate
Start the process of building up operands vectors in INFO.   

References build_uses, build_vdef, build_vuse, gcc_assert, and NULL_TREE.

Referenced by build_ssa_operands(), and verify_ssa_operands().

◆ verify_ssa_operands()

Field Documentation

◆ build_uses

auto_vec<tree *, 16> operands_scanner::build_uses
private

◆ build_vdef

◆ build_vuse

◆ fn

◆ stmt


The documentation for this class was generated from the following file: