GCC Middle and Back End API Reference
gimple-low.c File Reference

Data Structures

struct  return_statements_t
struct  lower_data

Typedefs

typedef struct return_statements_t return_statements_t

Functions

static void lower_stmt (gimple_stmt_iterator *, struct lower_data *)
static void lower_gimple_bind (gimple_stmt_iterator *, struct lower_data *)
static void lower_try_catch (gimple_stmt_iterator *, struct lower_data *)
static void lower_gimple_return (gimple_stmt_iterator *, struct lower_data *)
static void lower_builtin_setjmp (gimple_stmt_iterator *)
static unsigned int lower_function_body ()
gimple_opt_passmake_pass_lower_cf ()
static bool gimple_check_call_args ()
bool gimple_check_call_matching_types (gimple call_stmt, tree callee, bool args_count_match)
static void lower_sequence ()
static void lower_omp_directive ()
static void lower_stmt ()
static void lower_gimple_bind ()
static void lower_try_catch ()
static bool try_catch_may_fallthru ()
static bool gimple_try_catch_may_fallthru ()
bool block_may_fallthru ()
bool gimple_stmt_may_fallthru ()
bool gimple_seq_may_fallthru ()
static void lower_gimple_return ()
static void lower_builtin_setjmp ()
void record_vars_into ()
void record_vars ()

Typedef Documentation


Function Documentation

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 bool gimple_check_call_args ( )
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().

bool gimple_check_call_matching_types ( gimple  call_stmt,
tree  callee,
bool  args_count_match 
)
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_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 bool gimple_try_catch_may_fallthru ( )
static
static void lower_builtin_setjmp ( gimple_stmt_iterator )
static

Referenced by lower_stmt().

static void lower_builtin_setjmp ( )
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 void lower_gimple_bind ( gimple_stmt_iterator ,
struct lower_data  
)
static

Referenced by lower_function_body(), and lower_stmt().

static void lower_gimple_return ( gimple_stmt_iterator ,
struct lower_data  
)
static

Referenced by lower_stmt().

static void lower_omp_directive ( )
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 void lower_sequence ( )
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 void lower_stmt ( gimple_stmt_iterator ,
struct lower_data  
)
static

Referenced by lower_sequence().

static void lower_stmt ( )
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 void lower_try_catch ( gimple_stmt_iterator ,
struct lower_data  
)
static

Referenced by lower_stmt().

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 bool try_catch_may_fallthru ( )
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().