aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2024-05-21 14:20:52 -0400
committerAndrew MacLeod <amacleod@redhat.com>2024-05-23 16:50:00 -0400
commitfae5e6a4dfcf9270cd09c2240480860b09c2c627 (patch)
tree145e6647c4efbc8baaa3a0cdd8f6fbe6c88cb806 /gcc/gimple-range-cache.cc
parentac0bc89aea79b940a17697fb4a758254631c2400 (diff)
downloadgcc-fae5e6a4dfcf9270cd09c2240480860b09c2c627.zip
gcc-fae5e6a4dfcf9270cd09c2240480860b09c2c627.tar.gz
gcc-fae5e6a4dfcf9270cd09c2240480860b09c2c627.tar.bz2
Make gori_map a shared component.
Move gori_map dependency and import/export object into a range query and construct it simultaneously with a gori object. * gimple-range-cache.cc (ranger_cache::ranger_cache): Use gori_ssa. (ranger_cache::dump): Likewise. (ranger_cache::get_global_range): Likewise. (ranger_cache::set_global_range): Likewise. (ranger_cache::register_inferred_value): Likewise. * gimple-range-edge.h (gimple_outgoing_range::map): Remove. * gimple-range-fold.cc (fold_using_range::range_of_range_op): Use gori_ssa. (fold_using_range::range_of_address): Likewise. (fold_using_range::range_of_phi): Likewise. (fur_source::register_outgoing_edges): Likewise. * gimple-range-fold.h (fur_source::query): Make const. (gori_ssa): New. * gimple-range-gori.cc (gori_map::dump): Use 'this' pointer. (gori_compute::gori_compute): Construct with a gori_map. * gimple-range-gori.h (gori_compute:gori_compute): Change prototype. (gori_compute::map): Delete. (gori_compute::m_map): Change to a reference. (FOR_EACH_GORI_IMPORT_NAME): Change parameter gori to gorimap. (FOR_EACH_GORI_EXPORT_NAME): Likewise. * gimple-range-path.cc (path_range_query::compute_ranges_in_block): Use gori_ssa method. (path_range_query::compute_exit_dependencies): Likewise. * gimple-range.cc (gimple_ranger::range_of_stmt): Likewise. (gimple_ranger::register_transitive_inferred_ranges): Likewise. * tree-ssa-dom.cc (set_global_ranges_from_unreachable_edges): Likewise. * tree-ssa-threadedge.cc (compute_exit_dependencies): Likewise. * tree-vrp.cc (remove_unreachable::handle_early): Likewise. (remove_unreachable::remove_and_update_globals): Likewise. * value-query.cc (range_query::create_gori): Create gori map. (range_query::share_query): Copy gori map member. (range_query::range_query): Initiialize gori_map member. * value-query.h (range_query::gori_ssa): New. (range_query::m_map): New.
Diffstat (limited to 'gcc/gimple-range-cache.cc')
-rw-r--r--gcc/gimple-range-cache.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index e75cac6..a511a2c 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -969,7 +969,7 @@ ranger_cache::ranger_cache (int not_executable_flag, bool use_imm_uses)
{
basic_block bb = BASIC_BLOCK_FOR_FN (cfun, x);
if (bb)
- gori ().map ()->exports (bb);
+ gori_ssa ()->exports (bb);
}
m_update = new update_list ();
}
@@ -1000,7 +1000,7 @@ ranger_cache::dump (FILE *f)
void
ranger_cache::dump_bb (FILE *f, basic_block bb)
{
- gori ().map ()->dump (f, bb, false);
+ gori_ssa ()->dump (f, bb, false);
m_on_entry.dump (f, bb);
m_relation->dump (f, bb);
}
@@ -1033,8 +1033,8 @@ ranger_cache::get_global_range (vrange &r, tree name, bool &current_p)
current_p = false;
if (had_global)
current_p = r.singleton_p ()
- || m_temporal->current_p (name, gori ().map ()->depend1 (name),
- gori ().map ()->depend2 (name));
+ || m_temporal->current_p (name, gori_ssa ()->depend1 (name),
+ gori_ssa ()->depend2 (name));
else
{
// If no global value has been set and value is VARYING, fold the stmt
@@ -1071,8 +1071,8 @@ ranger_cache::set_global_range (tree name, const vrange &r, bool changed)
if (!changed)
{
// If there are dependencies, make sure this is not out of date.
- if (!m_temporal->current_p (name, gori ().map ()->depend1 (name),
- gori ().map ()->depend2 (name)))
+ if (!m_temporal->current_p (name, gori_ssa ()->depend1 (name),
+ gori_ssa ()->depend2 (name)))
m_temporal->set_timestamp (name);
return;
}
@@ -1097,7 +1097,7 @@ ranger_cache::set_global_range (tree name, const vrange &r, bool changed)
if (r.singleton_p ()
|| (POINTER_TYPE_P (TREE_TYPE (name)) && r.nonzero_p ()))
- gori ().map ()->set_range_invariant (name);
+ gori_ssa ()->set_range_invariant (name);
m_temporal->set_timestamp (name);
}
@@ -1783,7 +1783,7 @@ ranger_cache::register_inferred_value (const vrange &ir, tree name,
m_on_entry.set_bb_range (name, bb, r);
// If this range was invariant before, remove invariant.
if (!gori ().has_edge_range_p (name))
- gori ().map ()->set_range_invariant (name, false);
+ gori_ssa ()->set_range_invariant (name, false);
}
}