aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2020-11-02 17:04:23 -0500
committerAndrew MacLeod <amacleod@redhat.com>2020-11-03 10:17:39 -0500
commitea7df355ca4a4571d07d1fc9528cccd1393c2420 (patch)
treea6898fdc3b74d003b823e48bf9718981a469738e /gcc/gimple-range-cache.h
parent220929c067717605cab96a9c5fe93e2e01532e51 (diff)
downloadgcc-ea7df355ca4a4571d07d1fc9528cccd1393c2420.zip
gcc-ea7df355ca4a4571d07d1fc9528cccd1393c2420.tar.gz
gcc-ea7df355ca4a4571d07d1fc9528cccd1393c2420.tar.bz2
More Ranger cache tweaks
This patch splits the individual value propagation out from fill_block_cache, and calls it from set_global_value when the global value is updated. This ensures the "current" global value is reflected in the on-entry cache. * gimple-range-cache.cc (ssa_global_cache::get_global_range): Return true if there was a previous range set. (ranger_cache::ranger_cache): Take a gimple_ranger parameter. (ranger_cache::set_global_range): Propagate the value if updating. (ranger_cache::propagate_cache): Renamed from iterative_cache_update. (ranger_cache::propagate_updated_value): New. Split from: (ranger_cache::fill_block_cache): Split out value propagator. * gimple-range-cache.h (ssa_global_cache): Update prototypes. (ranger_cache): Update prototypes.
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r--gcc/gimple-range-cache.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index 599a292..0e84ab0 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -74,7 +74,7 @@ public:
ssa_global_cache ();
~ssa_global_cache ();
bool get_global_range (irange &r, tree name) const;
- void set_global_range (tree name, const irange &r);
+ bool set_global_range (tree name, const irange &r);
void clear_global_range (tree name);
void clear ();
void dump (FILE *f = stderr);
@@ -90,7 +90,7 @@ private:
class ranger_cache : public gori_compute_cache
{
public:
- ranger_cache (class range_query &q);
+ ranger_cache (class gimple_ranger &q);
~ranger_cache ();
virtual void ssa_range_in_bb (irange &r, tree name, basic_block bb);
@@ -108,7 +108,9 @@ private:
block_range_cache m_on_entry;
void add_to_update (basic_block bb);
void fill_block_cache (tree name, basic_block bb, basic_block def_bb);
- void iterative_cache_update (tree name);
+ void propagate_cache (tree name);
+
+ void propagate_updated_value (tree name, basic_block bb);
vec<basic_block> m_workback;
vec<basic_block> m_update_list;
@@ -121,7 +123,7 @@ private:
};
bool push_poor_value (basic_block bb, tree name);
vec<update_record> m_poor_value_list;
- class range_query &query;
+ class gimple_ranger &query;
};
#endif // GCC_SSA_RANGE_CACHE_H