aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-03-28 11:32:21 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-04-26 15:17:08 -0400
commit8a3590e5ce8fcc6b381d9572edbca6157bd67cfd (patch)
treeb1176591e8dd60847e5220355cbe6cdc6884f8f1 /gcc/gimple-range-cache.h
parentb6dea04fca6f249c553cb18d670a0845cd0579f8 (diff)
downloadgcc-8a3590e5ce8fcc6b381d9572edbca6157bd67cfd.zip
gcc-8a3590e5ce8fcc6b381d9572edbca6157bd67cfd.tar.gz
gcc-8a3590e5ce8fcc6b381d9572edbca6157bd67cfd.tar.bz2
Rename ssa_global_cache to ssa_cache and add has_range
This renames the ssa_global_cache to be ssa_cache. The original use was to function as a global cache, but its uses have expanded. Remove all mention of "global" from the class and methods. Also add a has_range method. * gimple-range-cache.cc (ssa_cache::ssa_cache): Rename. (ssa_cache::~ssa_cache): Rename. (ssa_cache::has_range): New. (ssa_cache::get_range): Rename. (ssa_cache::set_range): Rename. (ssa_cache::clear_range): Rename. (ssa_cache::clear): Rename. (ssa_cache::dump): Rename and use get_range. (ranger_cache::get_global_range): Use get_range and set_range. (ranger_cache::range_of_def): Use get_range. * gimple-range-cache.h (class ssa_cache): Rename class and methods. (class ranger_cache): Use ssa_cache. * gimple-range-path.cc (path_range_query::path_range_query): Use ssa_cache. (path_range_query::get_cache): Use get_range. (path_range_query::set_cache): Use set_range. * gimple-range-path.h (class path_range_query): Use ssa_cache. * gimple-range.cc (assume_query::assume_range_p): Use get_range. (assume_query::range_of_expr): Use get_range. (assume_query::assume_query): Use set_range. (assume_query::calculate_op): Use get_range and set_range. * gimple-range.h (class assume_query): Use ssa_cache.
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r--gcc/gimple-range-cache.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index 4ff435d..2d41f0c 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -52,14 +52,15 @@ private:
// has been visited during this incarnation. Once the ranger evaluates
// a name, it is typically not re-evaluated again.
-class ssa_global_cache
+class ssa_cache
{
public:
- ssa_global_cache ();
- ~ssa_global_cache ();
- bool get_global_range (vrange &r, tree name) const;
- bool set_global_range (tree name, const vrange &r);
- void clear_global_range (tree name);
+ ssa_cache ();
+ ~ssa_cache ();
+ bool has_range (tree name) const;
+ bool get_range (vrange &r, tree name) const;
+ bool set_range (tree name, const vrange &r);
+ void clear_range (tree name);
void clear ();
void dump (FILE *f = stderr);
private:
@@ -95,7 +96,7 @@ public:
void dump_bb (FILE *f, basic_block bb);
virtual void dump (FILE *f) override;
private:
- ssa_global_cache m_globals;
+ ssa_cache m_globals;
block_range_cache m_on_entry;
class temporal_cache *m_temporal;
void fill_block_cache (tree name, basic_block bb, basic_block def_bb);