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(), range_def_chain::get_def_chain(), and r.
Referenced by 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, range_def_chain::get_imports(), and SSA_NAME_VERSION.
Referenced by gori_compute::compute_logical_operands().
References a, b, bitmap_intersect_p(), and range_def_chain::get_def_chain().
References range_def_chain::m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gori_compute::may_recompute_p(), and gimple_ranger::register_transitive_inferred_ranges().
References range_def_chain::m_def_chain, NULL_TREE, ssa_name, and SSA_NAME_VERSION.
Referenced by gori_compute::may_recompute_p(), and 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 |
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(), ranger_cache::ranger_cache(), and remove_unreachable::remove_and_update_globals().
References count, gimple_bb(), gimple_range_ssa_names(), range_def_chain::has_def_chain(), range_def_chain::m_def_chain, range_def_chain::m_logical_depth, NULL, range_def_chain::register_dependency(), range_def_chain::set_import(), SSA_NAME_DEF_STMT, SSA_NAME_IS_DEFAULT_DEF, and SSA_NAME_VERSION.
Referenced by range_def_chain::add_def_chain_to_bitmap(), range_def_chain::def_chain_in_bitmap_p(), range_def_chain::dump(), range_def_chain::get_imports(), range_def_chain::in_chain_p(), and range_def_chain::register_dependency().
References range_def_chain::m_def_chain, num_ssa_names, and SSA_NAME_VERSION.
Referenced by range_def_chain::dump(), range_def_chain::get_def_chain(), and range_def_chain::get_imports().
bitmap gori_map::imports | ( | basic_block | bb | ) |
References calculate_gori(), basic_block_def::index, m_incoming, and m_outgoing.
Referenced by hybrid_jt_simplifier::compute_exit_dependencies(), dump(), and is_import_p().
References bitmap_bit_p, gcc_checking_assert, range_def_chain::get_def_chain(), gimple_range_ssa_p(), NULL, and SSA_NAME_VERSION.
Referenced by gori_compute::compute_operand_range(), gori_compute::compute_operand_range_switch(), fold_using_range::condexpr_adjust(), and gori_compute::refine_using_relation().
bool gori_map::is_export_p | ( | tree | name, |
basic_block | bb = NULL ) |
References bitmap_bit_p, exports(), m_maybe_variant, and SSA_NAME_VERSION.
Referenced by gori_compute::edge_range_p(), gori_compute::has_edge_range_p(), and gori_compute::may_recompute_p().
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, range_def_chain::get_def_chain(), range_def_chain::get_imports(), gimple_bb(), gimple_range_ssa_p(), is_a(), range_def_chain::m_bitmaps, range_def_chain::m_def_chain, NULL, NULL_TREE, num_ssa_names, range_def_chain::set_import(), range_def_chain::rdc::ssa1, range_def_chain::rdc::ssa2, SSA_NAME_DEF_STMT, and SSA_NAME_VERSION.
Referenced by range_def_chain::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, range_def_chain::m_bitmaps, NULL_TREE, and SSA_NAME_VERSION.
Referenced by range_def_chain::get_def_chain(), and range_def_chain::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 calculate_gori(), gori_map(), imports(), maybe_add_gori(), and ~gori_map().
|
privateinherited |
Referenced by range_def_chain::get_def_chain(), and range_def_chain::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().