aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-threadedge.cc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2024-05-17 14:27:12 -0400
committerAndrew MacLeod <amacleod@redhat.com>2024-05-23 16:50:00 -0400
commitac0bc89aea79b940a17697fb4a758254631c2400 (patch)
tree78c3c09fad8c61f7372c87ea5f5938a1c5314f20 /gcc/tree-ssa-threadedge.cc
parent44db939611a1cd3fdca93ae88d664f9886d549d5 (diff)
downloadgcc-ac0bc89aea79b940a17697fb4a758254631c2400.zip
gcc-ac0bc89aea79b940a17697fb4a758254631c2400.tar.gz
gcc-ac0bc89aea79b940a17697fb4a758254631c2400.tar.bz2
Make GORI a range_query component.
This patch moves the GORI component into the range_query object, and makes it generally available. This makes it much easier to share between ranger and the passes. * gimple-range-cache.cc (ranger_cache::ranger_cache): Create GORi via the range_query instead of a local member. (ranger_cache::dump_bb): Use gori via from the range_query parent. (ranger_cache::get_global_range): Likewise. (ranger_cache::set_global_range): Likewise. (ranger_cache::edge_range): Likewise. (anger_cache::block_range): Likewise. (ranger_cache::fill_block_cache): Likewise. (ranger_cache::range_from_dom): Likewise. (ranger_cache::register_inferred_value): Likewise. * gimple-range-cache.h (ranger_cache::m_gori): Delete. * gimple-range-fold.cc (fur_source::fur_source): Set m_depend_p. (fur_depend::fur_depend): Remove gori parameter. * gimple-range-fold.h (fur_source::gori): Adjust. (fur_source::m_gori): Delete. (fur_source::m_depend): New. (fur_depend::fur_depend): Adjust prototype. * gimple-range-path.cc (path_range_query::path_range_query): Share ranger oracles. (path_range_query::range_defined_in_block): Use oracle directly. (path_range_query::compute_ranges_in_block): Use new gori() method. (path_range_query::adjust_for_non_null_uses): Use oracle directly. (path_range_query::compute_exit_dependencies): Likewise. (jt_fur_source::jt_fur_source): No gori in the parameters. (path_range_query::range_of_stmt): Likewise. (path_range_query::compute_outgoing_relations): Likewise. * gimple-range.cc (gimple_ranger::fold_range_internal): Likewise. (gimple_ranger::range_of_stmt): Access gori via gori () method. (assume_query::range_of_expr): Create a gori object. (assume_query::~assume_query): Destroy a gori object. (assume_query::calculate_op): Remove old gori() accessor. * gimple-range.h (gimple_ranger::gori): Delete. (assume_query::~assume_query): New. (assume_query::m_gori): Delete. * tree-ssa-dom.cc (set_global_ranges_from_unreachable_edges): use gori () method. * tree-ssa-threadedge.cc (compute_exit_dependencies): Likewise. * value-query.cc (default_gori): New. (range_query::create_gori): New. (range_query::destroy_gori): New. (range_query::share_oracles): Set m_gori. (range_query::range_query): Set m_gori to default. (range_query::~range_query): call destroy gori. * value-query.h (range_query): Adjust prototypes (range_query::m_gori): New.
Diffstat (limited to 'gcc/tree-ssa-threadedge.cc')
-rw-r--r--gcc/tree-ssa-threadedge.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/tree-ssa-threadedge.cc b/gcc/tree-ssa-threadedge.cc
index f5268d4..766b68a 100644
--- a/gcc/tree-ssa-threadedge.cc
+++ b/gcc/tree-ssa-threadedge.cc
@@ -1446,10 +1446,8 @@ hybrid_jt_simplifier::compute_exit_dependencies (bitmap dependencies,
const vec<basic_block> &path,
gimple *stmt)
{
- gori_compute &gori = m_ranger->gori ();
-
// Start with the imports to the final conditional.
- bitmap_copy (dependencies, gori.map ()->imports (path[0]));
+ bitmap_copy (dependencies, m_ranger->gori ().map ()->imports (path[0]));
// Add any other interesting operands we may have missed.
if (gimple_bb (stmt) != path[0])