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 "cgraph.h"
#include "gimple-iterator.h"
#include "gimple-fold.h"
#include "gimple-walk.h"
#include "ipa-utils.h"
#include "except.h"
#include "gimplify.h"
Data Structures | |
struct | record_reference_ctx |
Functions | |
static tree | record_reference (tree *tp, int *walk_subtrees, void *data) |
static void | record_type_list (cgraph_node *node, tree list) |
static void | record_eh_tables (cgraph_node *node, function *fun) |
int | compute_call_stmt_bb_frequency (tree decl, basic_block bb) |
static bool | mark_address (gimple *stmt, tree addr, tree, void *data) |
static bool | mark_load (gimple *stmt, tree t, tree, void *data) |
static bool | mark_store (gimple *stmt, tree t, tree, void *data) |
gimple_opt_pass * | make_pass_build_cgraph_edges (gcc::context *ctxt) |
void | record_references_in_initializer (tree decl, bool only_vars) |
gimple_opt_pass * | make_pass_rebuild_cgraph_edges (gcc::context *ctxt) |
gimple_opt_pass * | make_pass_remove_cgraph_callee_edges (gcc::context *ctxt) |
int compute_call_stmt_bb_frequency | ( | tree | decl, |
basic_block | bb ) |
Computes the frequency of the call statement so that it can be stored in cgraph_edge. BB is the basic block of the call statement.
References basic_block_def::count, count, DECL_STRUCT_FUNCTION, ENTRY_BLOCK_PTR_FOR_FN, and profile_count::to_cgraph_frequency().
gimple_opt_pass * make_pass_build_cgraph_edges | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_rebuild_cgraph_edges | ( | gcc::context * | ctxt | ) |
gimple_opt_pass * make_pass_remove_cgraph_callee_edges | ( | gcc::context * | ctxt | ) |
Mark address taken in STMT.
References DECL_EXTERNAL, get_base_address(), cgraph_node::get_create(), varpool_node::get_create(), IPA_REF_ADDR, cgraph_node::mark_address_taken(), TREE_CODE, TREE_STATIC, and VAR_P.
Referenced by cgraph_node::record_stmt_references().
Mark load of T.
References DECL_EXTERNAL, get_base_address(), cgraph_node::get_create(), varpool_node::get_create(), IPA_REF_ADDR, IPA_REF_LOAD, cgraph_node::mark_address_taken(), TREE_CODE, TREE_STATIC, and VAR_P.
Referenced by cgraph_node::record_stmt_references().
Mark store of T.
References DECL_EXTERNAL, get_base_address(), varpool_node::get_create(), IPA_REF_STORE, TREE_STATIC, and VAR_P.
Referenced by cgraph_node::record_stmt_references().
|
static |
Record all references we will introduce by producing EH tables for NODE.
References symtab_node::create_reference(), symtab_node::decl, DECL_FUNCTION_PERSONALITY, function::eh, ERT_ALLOWED_EXCEPTIONS, ERT_CLEANUP, ERT_MUST_NOT_THROW, ERT_TRY, cgraph_node::get_create(), i, IPA_REF_ADDR, cgraph_node::mark_address_taken(), eh_catch_d::next_catch, NULL, record_type_list(), eh_status::region_tree, and eh_catch_d::type_list.
Referenced by cgraph_edge::rebuild_edges(), and cgraph_edge::rebuild_references().
Walk tree and record all calls and references to functions/variables. Called via walk_tree: TP is pointer to tree to be examined. When DATA is non-null, record references to callgraph.
References canonicalize_constructor_val(), symtab_node::create_reference(), symtab_node::decl, DECL_HAS_VALUE_EXPR_P, DECL_VALUE_EXPR, gcc_unreachable, get_base_var(), cgraph_node::get_create(), varpool_node::get_create(), IPA_REF_ADDR, IS_TYPE_OR_DECL_P, cgraph_node::mark_address_taken(), NULL, NULL_TREE, record_reference_ctx::only_vars, record_reference(), TREE_CODE, TREE_OPERAND, unshare_expr(), VAR_P, and record_reference_ctx::varpool_node.
Referenced by record_reference(), and record_references_in_initializer().
Record references to functions and other variables present in the initial value of DECL, a variable. When ONLY_VARS is true, we mark needed only variables, not functions.
References DECL_INITIAL, varpool_node::get_create(), NULL, record_reference_ctx::only_vars, record_reference(), record_reference_ctx::varpool_node, and walk_tree.
Referenced by varpool_node::analyze(), function_and_variable_visibility(), and new_emutls_decl().
|
static |
Record references to typeinfos in the type list LIST.
References symtab_node::create_reference(), varpool_node::get_create(), IPA_REF_ADDR, lookup_type_for_runtime(), STRIP_NOPS, TREE_CHAIN, TREE_CODE, TREE_OPERAND, TREE_VALUE, TYPE_P, and VAR_P.
Referenced by record_eh_tables().