aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2023-07-28 11:00:57 -0400
committerAndrew MacLeod <amacleod@redhat.com>2023-07-28 16:32:12 -0400
commit72fb44ca53fda15024e0c272052b74b1f32735b1 (patch)
tree75a13d05d7bb52bf773ec88574f33897f56eff28 /gcc/gimple-range-cache.h
parent619641397a558bf65c24b99a4c52878bd940fcbe (diff)
downloadgcc-72fb44ca53fda15024e0c272052b74b1f32735b1.zip
gcc-72fb44ca53fda15024e0c272052b74b1f32735b1.tar.gz
gcc-72fb44ca53fda15024e0c272052b74b1f32735b1.tar.bz2
Add a merge_range to ssa_cache and use it. add empty_p and param tweaks.
* gimple-range-cache.cc (ssa_cache::merge_range): New. (ssa_lazy_cache::merge_range): New. * gimple-range-cache.h (class ssa_cache): Adjust protoypes. (class ssa_lazy_cache): Ditto. * gimple-range.cc (assume_query::calculate_op): Use merge_range.
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r--gcc/gimple-range-cache.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index a0f436b..bbb9b18 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -61,11 +61,11 @@ public:
virtual bool has_range (tree name) const;
virtual bool get_range (vrange &r, tree name) const;
virtual bool set_range (tree name, const vrange &r);
+ virtual bool merge_range (tree name, const vrange &r);
virtual void clear_range (tree name);
virtual void clear ();
void dump (FILE *f = stderr);
- virtual bool range_of_expr (vrange &r, tree expr, gimple *stmt);
-
+ virtual bool range_of_expr (vrange &r, tree expr, gimple *stmt = NULL);
protected:
vec<vrange_storage *> m_tab;
vrange_allocator *m_range_allocator;
@@ -80,8 +80,10 @@ class ssa_lazy_cache : public ssa_cache
public:
inline ssa_lazy_cache () { active_p = BITMAP_ALLOC (NULL); }
inline ~ssa_lazy_cache () { BITMAP_FREE (active_p); }
+ inline bool empty_p () const { return bitmap_empty_p (active_p); }
virtual bool has_range (tree name) const;
virtual bool set_range (tree name, const vrange &r);
+ virtual bool merge_range (tree name, const vrange &r);
virtual bool get_range (vrange &r, tree name) const;
virtual void clear_range (tree name);
virtual void clear ();