GCC Middle and Back End API Reference
|
#include "config.h"
#include "system.h"
#include "coretypes.h"
#include "backend.h"
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
#include "ssa.h"
#include "tree-pretty-print.h"
#include "gimple-iterator.h"
#include "gimple-walk.h"
#include "internal-fn.h"
Data Structures | |
struct | nrv_data_t |
Functions | |
static tree | finalize_nrv_r (tree *, int *, void *) |
gimple_opt_pass * | make_pass_nrv (gcc::context *ctxt) |
static bool | dest_safe_for_nrv_p (gcall *call) |
gimple_opt_pass * | make_pass_return_slot (gcc::context *ctxt) |
Determine (pessimistically) whether DEST is available for NRV optimization, where DEST is expected to be the LHS of a modify expression where the RHS is a function returning an aggregate. DEST is available if it is not clobbered or used by the call.
References call_may_clobber_ref_p(), get_base_address(), gimple_call_lhs(), ref_maybe_used_by_stmt_p(), and TREE_CODE.
Callback for the tree walker. If TP refers to a RETURN_EXPR, then set the expression being returned to nrv_data->result. If TP refers to nrv_data->var, then replace nrv_data->var with nrv_data->result. If we reach a node where we know all the subtrees are uninteresting, then set *WALK_SUBTREES to zero.
References nrv_data_t::modified, NULL_TREE, nrv_data_t::result, TYPE_P, and nrv_data_t::var.
gimple_opt_pass * make_pass_nrv | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_return_slot | ( | gcc::context * | ctxt | ) |