aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.h
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2024-06-26 14:53:54 -0400
committerAndrew MacLeod <amacleod@redhat.com>2024-06-28 13:49:25 -0400
commit5612541834c063dd4126fb059e59c5dc8d5f2f8e (patch)
tree751069bb7bb4941006374d9a8bbdb2d791161527 /gcc/gimple-range-cache.h
parent7419b4fe48b48e44b27e2dadc9ff870f5e049077 (diff)
downloadgcc-5612541834c063dd4126fb059e59c5dc8d5f2f8e.zip
gcc-5612541834c063dd4126fb059e59c5dc8d5f2f8e.tar.gz
gcc-5612541834c063dd4126fb059e59c5dc8d5f2f8e.tar.bz2
ssa_lazy_cache takes an optional bitmap_obstack pointer.
Allow ssa_lazy cache to allocate bitmaps from a client provided obstack if so desired. * gimple-range-cache.cc (ssa_lazy_cache::ssa_lazy_cache): Relocate here. Check for provided obstack. (ssa_lazy_cache::~ssa_lazy_cache): Relocate here. Free bitmap or obstack. * gimple-range-cache.h (ssa_lazy_cache::ssa_lazy_cache): Move. (ssa_lazy_cache::~ssa_lazy_cache): Move. (ssa_lazy_cache::m_ob): New. * gimple-range.cc (dom_ranger::dom_ranger): Iniitialize obstack. (dom_ranger::~dom_ranger): Release obstack. (dom_ranger::pre_bb): Create ssa_lazy_cache using obstack. * gimple-range.h (m_bitmaps): New.
Diffstat (limited to 'gcc/gimple-range-cache.h')
-rw-r--r--gcc/gimple-range-cache.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/gimple-range-cache.h b/gcc/gimple-range-cache.h
index 0ea34d3..539c067 100644
--- a/gcc/gimple-range-cache.h
+++ b/gcc/gimple-range-cache.h
@@ -78,12 +78,8 @@ protected:
class ssa_lazy_cache : public ssa_cache
{
public:
- inline ssa_lazy_cache ()
- {
- bitmap_obstack_initialize (&m_bitmaps);
- active_p = BITMAP_ALLOC (&m_bitmaps);
- }
- inline ~ssa_lazy_cache () { bitmap_obstack_release (&m_bitmaps); }
+ ssa_lazy_cache (bitmap_obstack *ob = NULL);
+ ~ssa_lazy_cache ();
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);
@@ -94,6 +90,7 @@ public:
void merge (const ssa_lazy_cache &);
protected:
bitmap_obstack m_bitmaps;
+ bitmap_obstack *m_ob;
bitmap active_p;
};