GCC Middle and Back End API Reference
|
Data Structures | |
struct | return_statements_t |
struct | lower_data |
Typedefs | |
typedef struct return_statements_t | return_statements_t |
typedef struct return_statements_t return_statements_t |
bool block_may_fallthru | ( | ) |
Try to determine if we can fall out of the bottom of BLOCK. This guess need not be 100% accurate; simply be conservative and return true if we don't know. This is used only to avoid stupidly generating extra code. If we're wrong, we'll just delete the extra code later.
References lang_hooks::block_may_fallthru, call_expr_flags(), expr_last(), and try_catch_may_fallthru().
Referenced by shortcut_cond_expr(), and try_catch_may_fallthru().
|
static |
Verify if the type of the argument matches that of the function declaration. If we cannot verify this or there is a mismatch, return false.
References fold_convertible_p(), gimple_call_arg(), gimple_call_fntype(), gimple_call_internal_p(), gimple_call_num_args(), and types_compatible_p().
Referenced by gimple_check_call_matching_types().
Verify if the type of the argument and lhs of CALL_STMT matches that of the function declaration CALLEE. If ARGS_COUNT_MATCH is true, the arg count needs to be the same. If we cannot verify this or there is a mismatch, return false.
References fold_convertible_p(), gimple_call_lhs(), gimple_check_call_args(), and useless_type_conversion_p().
Referenced by cgraph_create_edge_1(), cgraph_make_edge_direct(), cgraph_redirect_edge_call_stmt_to_callee(), check_ic_target(), early_inliner(), and update_indirect_edges_after_inlining().
bool gimple_seq_may_fallthru | ( | ) |
Same as gimple_stmt_may_fallthru, but for the gimple sequence SEQ.
References gimple_seq_last_stmt(), and gimple_stmt_may_fallthru().
Referenced by frob_into_branch_around(), gimple_stmt_may_fallthru(), gimple_try_catch_may_fallthru(), gimplify_cond_expr(), honor_protect_cleanup_actions(), lower_catch(), lower_cleanup(), lower_eh_constructs(), lower_function_body(), and lower_try_finally().
bool gimple_stmt_may_fallthru | ( | ) |
Try to determine if we can continue executing the statement immediately following STMT. This guess need not be 100% accurate; simply be conservative and return true if we don't know. This is used only to avoid stupidly generating extra code. If we're wrong, we'll just delete the extra code later.
References gimple_bind_body(), gimple_call_flags(), gimple_eh_else_e_body(), gimple_eh_else_n_body(), gimple_seq_may_fallthru(), GIMPLE_TRY_CATCH, gimple_try_catch_may_fallthru(), gimple_try_cleanup(), gimple_try_eval(), and gimple_try_kind().
Referenced by convert_nl_goto_receiver(), gimple_seq_may_fallthru(), and lower_eh_constructs_2().
|
static |
Same as above, but for a GIMPLE_TRY_CATCH.
References gimple_catch_handler(), gimple_eh_filter_failure(), gimple_seq_may_fallthru(), GIMPLE_TRY_CATCH, gimple_try_cleanup_ptr(), gimple_try_eval(), gimple_try_kind(), gsi_end_p(), gsi_next(), and gsi_stmt().
Referenced by gimple_stmt_may_fallthru().
|
static |
Referenced by lower_stmt().
|
static |
Lower a __builtin_setjmp GSI. __builtin_setjmp is passed a pointer to an array of five words (not all will be used on all machines). It operates similarly to the C library function of the same name, but is more efficient. It is lowered into 3 other builtins, namely __builtin_setjmp_setup, __builtin_setjmp_dispatcher and __builtin_setjmp_receiver, but with __builtin_setjmp_dispatcher shared among all the instances; that's why it is only emitted at the end by lower_function_body. After full lowering, the body of the function should look like: { void * setjmpvar.0; int D.1844; int D.2844; [...] __builtin_setjmp_setup (&buf, &<D1847>); D.1844 = 0; goto <D1846>; <D1847>:; __builtin_setjmp_receiver (&<D1847>); D.1844 = 1; <D1846>:; if (D.1844 == 0) goto <D1848>; else goto <D1849>; [...] __builtin_setjmp_setup (&buf, &<D2847>); D.2844 = 0; goto <D2846>; <D2847>:; __builtin_setjmp_receiver (&<D2847>); D.2844 = 1; <D2846>:; if (D.2844 == 0) goto <D2848>; else goto <D2849>; [...] <D3850>:; return; <D3853>: [non-local]; setjmpvar.0 = __builtin_setjmp_dispatcher (&<D3853>); goto setjmpvar.0; } The dispatcher block will be both the unique destination of all the abnormal call edges and the unique source of all the abnormal edges to the receivers, thus keeping the complexity explosion localized.
References build_addr(), build_zero_cst(), builtin_decl_implicit(), create_artificial_label(), current_function_decl, fold_convert_loc(), g, gimple_block(), gimple_build_call(), gimple_build_goto(), gimple_build_label(), gimple_call_arg(), gimple_call_lhs(), gimple_location(), gimple_set_block(), gimple_set_location(), gsi_insert_before(), gsi_remove(), GSI_SAME_STMT, and gsi_stmt().
|
static |
Lower the body of current_function_decl from High GIMPLE into Low GIMPLE.
References lower_data::block, blocks_nreverse(), build_addr(), builtin_decl_implicit(), lower_data::calls_builtin_setjmp, cfun, clear_block_marks(), create_artificial_label(), create_tmp_var(), current_function_decl, function::function_end_locus, gimple_body(), gimple_build_call(), gimple_build_goto(), gimple_build_label(), gimple_build_return(), gimple_call_set_lhs(), gimple_return_retval(), gimple_seq_add_stmt(), gimple_seq_first(), gimple_seq_first_stmt(), gimple_seq_last(), gimple_seq_may_fallthru(), gimple_set_block(), gimple_set_body(), gimple_set_location(), GSI_CONTINUE_LINKING, gsi_insert_after(), function::has_nonlocal_label, return_statements_t::label, lower_gimple_bind(), memset(), lower_data::return_statements, and return_statements_t::stmt.
|
static |
Referenced by lower_function_body(), and lower_stmt().
|
static |
Lower a bind_expr TSI. DATA is passed through the recursion.
References lower_data::block, blocks_nreverse(), current_function_decl, gimple_bind_block(), gimple_bind_body(), gimple_bind_body_ptr(), gimple_bind_vars(), gsi_insert_seq_before(), gsi_remove(), GSI_SAME_STMT, gsi_stmt(), lower_sequence(), and record_vars().
|
static |
Referenced by lower_stmt().
|
static |
Lower a GIMPLE_RETURN GSI. DATA is passed through the recursion.
References cfun, create_artificial_label(), function::function_end_locus, gimple_block(), gimple_build_goto(), gimple_has_location(), gimple_location(), gimple_return_retval(), gimple_set_block(), gimple_set_location(), gsi_insert_before(), gsi_remove(), GSI_SAME_STMT, gsi_stmt(), return_statements_t::label, lower_data::return_statements, and return_statements_t::stmt.
|
static |
Lower the OpenMP directive statement pointed by GSI. DATA is passed through the recursion.
References gimple_omp_body(), gimple_omp_body_ptr(), gimple_omp_set_body(), GSI_CONTINUE_LINKING, gsi_insert_seq_after(), gsi_next(), gsi_stmt(), and lower_sequence().
Referenced by lower_stmt().
|
static |
Lower sequence SEQ. Unlike gimplification the statements are not relowered when they are changed -- if this has to be done, the lowering routine must do it explicitly. DATA is passed through the recursion.
References gsi_end_p(), and lower_stmt().
Referenced by lower_gimple_bind(), lower_omp_directive(), lower_stmt(), and lower_try_catch().
|
static |
Referenced by lower_sequence().
|
static |
Lower statement GSI. DATA is passed through the recursion. We try to track the fallthruness of statements and get rid of unreachable return statements in order to prevent the EH lowering pass from adding useless edges that can cause bogus warnings to be issued later; this guess need not be 100% accurate, simply be conservative and reset cannot_fallthru to false if we don't know.
References lower_data::block, BUILT_IN_NORMAL, lower_data::calls_builtin_setjmp, lower_data::cannot_fallthru, flags_from_decl_or_type(), gimple_call_arg(), gimple_call_fndecl(), gimple_call_num_args(), gimple_eh_else_e_body_ptr(), gimple_eh_else_n_body_ptr(), gimple_set_block(), gimple_transaction_body_ptr(), GIMPLE_TRY_CATCH, gimple_try_cleanup_ptr(), gimple_try_eval_ptr(), gimple_try_kind(), gsi_next(), gsi_remove(), gsi_stmt(), lower_builtin_setjmp(), lower_gimple_bind(), lower_gimple_return(), lower_omp_directive(), lower_sequence(), and lower_try_catch().
|
static |
Referenced by lower_stmt().
|
static |
Same as above, but for a GIMPLE_TRY_CATCH.
References lower_data::cannot_fallthru, gimple_catch_handler_ptr(), gimple_eh_filter_failure_ptr(), GIMPLE_TRY_CATCH, gimple_try_cleanup_ptr(), gimple_try_eval_ptr(), gimple_try_kind(), gsi_end_p(), gsi_next(), gsi_stmt(), and lower_sequence().
gimple_opt_pass* make_pass_lower_cf | ( | ) |
void record_vars | ( | ) |
Record the variables in VARS into current_function_decl.
References current_function_decl, and record_vars_into().
Referenced by gimple_add_tmp_var(), lower_gimple_bind(), and pop_gimplify_context().
void record_vars_into | ( | ) |
Record the variables in VARS into function FN.
References add_local_decl(), cfun, current_function_decl, pop_cfun(), and push_cfun().
Referenced by lower_omp_taskreg(), and record_vars().
|
static |
Try to determine whether a TRY_CATCH expression can fall through. This is a subroutine of block_may_fallthru.
References block_may_fallthru(), tsi_end_p(), tsi_next(), tsi_start(), and tsi_stmt().
Referenced by block_may_fallthru().