GCC Middle and Back End API Reference
|
#include <gimple-range-gori.h>
Public Member Functions | |
gori_map () | |
~gori_map () | |
bool | is_export_p (tree name, basic_block bb=NULL) |
bool | is_import_p (tree name, basic_block bb) |
bitmap | exports (basic_block bb) |
bitmap | imports (basic_block bb) |
void | set_range_invariant (tree name, bool invariant=true) |
void | dump (FILE *f) |
void | dump (FILE *f, basic_block bb, bool verbose=true) |
tree | depend1 (tree name) const |
tree | depend2 (tree name) const |
bool | in_chain_p (tree name, tree def) |
bool | chain_import_p (tree name, tree import) |
void | register_dependency (tree name, tree ssa1, basic_block bb=NULL) |
void | dump (FILE *f, basic_block bb, const char *prefix=NULL) |
Protected Member Functions | |
bool | has_def_chain (tree name) |
bool | def_chain_in_bitmap_p (tree name, bitmap b) |
void | add_def_chain_to_bitmap (bitmap b, tree name) |
bitmap | get_def_chain (tree name) |
bitmap | get_imports (tree name) |
Protected Attributes | |
bitmap_obstack | m_bitmaps |
Private Member Functions | |
void | maybe_add_gori (tree name, basic_block bb) |
void | calculate_gori (basic_block bb) |
void | set_import (struct rdc &data, tree imp, bitmap b) |
Private Attributes | |
vec< bitmap > | m_outgoing |
vec< bitmap > | m_incoming |
bitmap | m_maybe_variant |
vec< rdc > | m_def_chain |
int | m_logical_depth |
gori_map::gori_map | ( | ) |
GORI_MAP is used to accumulate what SSA names in a block can generate range information, and provides tools for the block ranger to enable it to efficiently calculate these ranges. GORI stands for "Generates Outgoing Range Information." It utilizes the range_def_chain class to construct def_chains. Information for a basic block is calculated once and stored. It is only calculated the first time a query is made. If no queries are made, there is little overhead. one bitmap is maintained for each basic block: m_outgoing : a set bit indicates a range can be generated for a name. Generally speaking, the m_outgoing vector is the union of the entire def_chain of all SSA names used in the last statement of the block which generate ranges.
References BITMAP_ALLOC, cfun, last_basic_block_for_fn, range_def_chain::m_bitmaps, m_incoming, m_maybe_variant, and m_outgoing.
gori_map::~gori_map | ( | ) |
References m_incoming, and m_outgoing.
References b, bitmap_ior_into(), get_def_chain(), and r.
Referenced by gori_map::maybe_add_gori().
|
private |
References as_a(), BITMAP_ALLOC, bitmap_ior_into(), cfun, EDGE_COUNT, gcc_checking_assert, gimple_bb(), gimple_cond_lhs(), gimple_cond_rhs(), gimple_outgoing_range_stmt_p(), gimple_range_ssa_p(), gimple_switch_index(), basic_block_def::index, is_a(), last_basic_block_for_fn, range_def_chain::m_bitmaps, m_incoming, m_maybe_variant, m_outgoing, maybe_add_gori(), NULL, single_succ_p(), and basic_block_def::succs.
References b, bitmap_bit_p, get_imports(), and SSA_NAME_VERSION.
References a, b, bitmap_intersect_p(), and get_def_chain().
References m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gimple_ranger::register_transitive_inferred_ranges().
References m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gimple_ranger::register_transitive_inferred_ranges().
void gori_map::dump | ( | FILE * | f | ) |
References cfun, dump(), and FOR_EACH_BB_FN.
Referenced by dump(), and ranger_cache::dump_bb().
void gori_map::dump | ( | FILE * | f, |
basic_block | bb, | ||
bool | verbose = true ) |
|
inherited |
References bitmap_bit_p, bitmap_empty_p(), EXECUTE_IF_SET_IN_BITMAP, get_def_chain(), get_imports(), gimple_bb(), has_def_chain(), NULL, num_ssa_names, print_generic_expr(), ssa_name, SSA_NAME_DEF_STMT, TDF_SLIM, and y.
Referenced by gori_map::dump().
bitmap gori_map::exports | ( | basic_block | bb | ) |
References calculate_gori(), basic_block_def::index, and m_outgoing.
Referenced by path_range_query::compute_ranges_in_block(), is_export_p(), and ranger_cache::ranger_cache().
References count, gimple_bb(), gimple_range_ssa_names(), has_def_chain(), m_def_chain, m_logical_depth, NULL, register_dependency(), set_import(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and SSA_NAME_VERSION.
Referenced by add_def_chain_to_bitmap(), def_chain_in_bitmap_p(), dump(), get_imports(), in_chain_p(), and register_dependency().
References get_def_chain(), has_def_chain(), i, m_def_chain, and SSA_NAME_VERSION.
Referenced by chain_import_p(), dump(), gori_map::maybe_add_gori(), and register_dependency().
References m_def_chain, num_ssa_names, and SSA_NAME_VERSION.
Referenced by dump(), get_def_chain(), and get_imports().
bitmap gori_map::imports | ( | basic_block | bb | ) |
References calculate_gori(), basic_block_def::index, m_incoming, and m_outgoing.
Referenced by dump(), and is_import_p().
References bitmap_bit_p, gcc_checking_assert, get_def_chain(), gimple_range_ssa_p(), NULL, and SSA_NAME_VERSION.
Referenced by fold_using_range::condexpr_adjust().
bool gori_map::is_export_p | ( | tree | name, |
basic_block | bb = NULL ) |
References bitmap_bit_p, exports(), m_maybe_variant, and SSA_NAME_VERSION.
bool gori_map::is_import_p | ( | tree | name, |
basic_block | bb ) |
References bitmap_bit_p, imports(), and SSA_NAME_VERSION.
|
private |
|
inherited |
References b, BITMAP_ALLOC, bitmap_ior_into(), bitmap_set_bit, range_def_chain::rdc::bm, get_def_chain(), get_imports(), gimple_bb(), gimple_range_ssa_p(), is_a(), m_bitmaps, m_def_chain, NULL, NULL_TREE, num_ssa_names, set_import(), range_def_chain::rdc::ssa1, range_def_chain::rdc::ssa2, SSA_NAME_DEF_STMT, and SSA_NAME_VERSION.
Referenced by get_def_chain(), fold_using_range::range_of_address(), fold_using_range::range_of_phi(), and fold_using_range::range_of_range_op().
References b, BITMAP_ALLOC, bitmap_ior_into(), bitmap_set_bit, m_bitmaps, NULL_TREE, and SSA_NAME_VERSION.
Referenced by get_def_chain(), and register_dependency().
References bitmap_clear_bit(), bitmap_set_bit, m_maybe_variant, and SSA_NAME_VERSION.
Referenced by ranger_cache::register_inferred_value(), and ranger_cache::set_global_range().
|
protectedinherited |
Referenced by gori_map::calculate_gori(), gori_map::gori_map(), range_def_chain(), register_dependency(), set_import(), and ~range_def_chain().
Referenced by depend1(), depend2(), get_def_chain(), get_imports(), has_def_chain(), range_def_chain(), register_dependency(), and ~range_def_chain().
Referenced by calculate_gori(), gori_map(), imports(), maybe_add_gori(), and ~gori_map().
|
privateinherited |
Referenced by get_def_chain(), and range_def_chain().
|
private |
Referenced by calculate_gori(), gori_map(), is_export_p(), and set_range_invariant().
Referenced by calculate_gori(), dump(), exports(), gori_map(), imports(), maybe_add_gori(), and ~gori_map().