vec<int> m_update_list;
int m_update_head;
bitmap m_propfail;
+ bitmap_obstack m_bitmaps;
};
// Create an update list.
m_update_list.create (0);
m_update_list.safe_grow_cleared (last_basic_block_for_fn (cfun) + 64);
m_update_head = -1;
- m_propfail = BITMAP_ALLOC (NULL);
+ bitmap_obstack_initialize (&m_bitmaps);
+ m_propfail = BITMAP_ALLOC (&m_bitmaps);
}
// Destroy an update list.
update_list::~update_list ()
{
m_update_list.release ();
- BITMAP_FREE (m_propfail);
+ bitmap_obstack_release (&m_bitmaps);
}
// Add BB to the list of blocks to update, unless it's already in the list.
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 ssa_lazy_cache ()
+ {
+ bitmap_obstack_initialize (&m_bitmaps);
+ active_p = BITMAP_ALLOC (&m_bitmaps);
+ }
+ inline ~ssa_lazy_cache () { bitmap_obstack_release (&m_bitmaps); }
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 void clear ();
void merge (const ssa_lazy_cache &);
protected:
+ bitmap_obstack m_bitmaps;
bitmap active_p;
};
{
gimple_ranger *r;
- bitmap_obstack_initialize (NULL);
-
gcc_checking_assert (!fun->x_range_query);
r = new gimple_ranger (use_imm_uses);
fun->x_range_query = r;
gcc_checking_assert (fun->x_range_query);
delete fun->x_range_query;
fun->x_range_query = NULL;
-
- bitmap_obstack_release (NULL);
}
// ------------------------------------------------------------------------