GCC Middle and Back End API Reference
|
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 function * | fn |
gimple * | stmt |
Class containing temporary per-stmt state.
References build_vdef, build_vuse, fn, NULL_TREE, and stmt.
|
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, 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().
|
private |
Add virtual operands for STMT. FLAGS is as in get_expr_operands.
References append_vdef(), append_vuse(), fn, gcc_assert, gimple_vop(), is_gimple_debug(), opf_def, opf_no_vops, and stmt.
Referenced by add_stmt_operand(), get_asm_stmt_operands(), get_mem_ref_operands(), get_tmr_operands(), maybe_add_call_vops(), and parse_ssa_operands().
|
inlineprivate |
Add USE_P to the list of pointers to operands.
References build_uses.
Referenced by add_stmt_operand().
|
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().
|
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().
void operands_scanner::build_ssa_operands | ( | ) |
Create an operands cache for STMT.
References finalize_ssa_stmt_operands(), gimple_set_has_volatile_ops(), parse_ssa_operands(), start_ssa_stmt_operands(), and stmt.
Referenced by update_stmt_operands().
|
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().
|
private |
|
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, 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().
|
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().
|
inlineprivate |
Takes elements from build_uses and turns them into use operands of STMT.
References add_use_op(), build_uses, build_vdef, build_vuse, delink_imm_use(), fn, ssa_operands::free_uses, function::gimple_df, gimple_set_use_ops(), gimple_set_vuse(), gimple_ssa_operands(), gimple_use_ops(), gimple_vop(), gimple_vuse(), gimple_vuse_ptr(), last, use_optype_d::next, NULL, NULL_TREE, gimple_df::rename_vops, SSA_NAME_VAR, gimple_df::ssa_renaming_needed, stmt, TREE_CODE, and USE_OP_PTR.
Referenced by finalize_ssa_stmt_operands().
|
private |
Scan operands in the ASM_EXPR stmt referred to in INFO.
References add_virtual_operand(), alloca, gcc_assert, get_expr_operands(), gimple_asm_clobbers_memory_p(), gimple_asm_input_op(), gimple_asm_ninputs(), gimple_asm_noutputs(), gimple_asm_output_op(), i, mark_address_taken(), opf_def, opf_not_non_addressable, parse_input_constraint(), parse_output_constraint(), stmt, TREE_PURPOSE, TREE_STRING_POINTER, and TREE_VALUE.
Referenced by parse_ssa_operands().
|
private |
Recursively scan the expression pointed to by EXPR_P in statement STMT. FLAGS is one of the OPF_* constants modifying how to interpret the operands found.
References add_stmt_operand(), CONSTRUCTOR_ELTS, debug_tree(), gcc_assert, gcc_unreachable, get_expr_operands(), get_mem_ref_operands(), get_tmr_operands(), gimple_debug_bind_p(), gimple_set_has_volatile_ops(), is_gimple_debug(), mark_address_taken(), NULL, opf_address_taken, opf_no_vops, opf_non_addressable, opf_not_non_addressable, opf_use, stmt, tcc_binary, tcc_comparison, tcc_constant, tcc_type, tcc_unary, TREE_CODE, TREE_CODE_CLASS, TREE_OPERAND, TREE_THIS_VOLATILE, constructor_elt::value, and vec_safe_iterate().
Referenced by get_asm_stmt_operands(), get_expr_operands(), get_mem_ref_operands(), get_tmr_operands(), and parse_ssa_operands().
|
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(), 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().
|
private |
A subroutine of get_expr_operands to handle TARGET_MEM_REF.
References add_virtual_operand(), get_expr_operands(), gimple_set_has_volatile_ops(), opf_no_vops, opf_non_addressable, opf_not_non_addressable, opf_use, stmt, TMR_BASE, TMR_INDEX, TMR_INDEX2, and TREE_THIS_VOLATILE.
Referenced by get_expr_operands().
|
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, gimple_call_flags(), opf_def, opf_use, and stmt.
Referenced by parse_ssa_operands().
|
private |
Parse STMT looking for operands. When finished, the various build_* operand vectors will have potential operands in them.
References add_virtual_operand(), append_vuse(), as_a(), fn, get_asm_stmt_operands(), get_expr_operands(), gimple_debug_bind_get_value_ptr(), gimple_debug_bind_has_value_p(), gimple_debug_bind_p(), gimple_num_ops(), gimple_op_ptr(), gimple_vop(), i, maybe_add_call_vops(), opf_def, opf_no_vops, opf_use, and stmt.
Referenced by build_ssa_operands(), and verify_ssa_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().
DEBUG_FUNCTION bool operands_scanner::verify_ssa_operands | ( | ) |
Verifies SSA statement operands.
References build_uses, build_vdef, build_vuse, cleanup_build_arrays(), debug_generic_expr(), DEF_FROM_PTR, error(), FOR_EACH_SSA_USE_OPERAND, FOR_EACH_VEC_ELT, gimple_has_volatile_ops(), gimple_set_has_volatile_ops(), gimple_vdef(), gimple_vdef_op(), gimple_vuse(), gimple_vuse_op(), i, NULL, NULL_DEF_OPERAND_P, NULL_USE_OPERAND_P, parse_ssa_operands(), SSA_NAME_VAR, SSA_OP_USE, start_ssa_stmt_operands(), stmt, TREE_CODE, ssa_use_operand_t::use, and USE_FROM_PTR.
Referenced by verify_ssa_operands().
Referenced by append_use(), cleanup_build_arrays(), finalize_ssa_uses(), start_ssa_stmt_operands(), and verify_ssa_operands().
|
private |
|
private |
|
private |
Referenced by add_stmt_operand(), add_virtual_operand(), finalize_ssa_defs(), finalize_ssa_uses(), operands_scanner(), and parse_ssa_operands().
|
private |
Referenced by add_stmt_operand(), add_virtual_operand(), build_ssa_operands(), finalize_ssa_defs(), finalize_ssa_uses(), get_asm_stmt_operands(), get_expr_operands(), get_mem_ref_operands(), get_tmr_operands(), maybe_add_call_vops(), operands_scanner(), parse_ssa_operands(), and verify_ssa_operands().