From: Trevor Saunders <tbsaunde+...@tbsaunde.org>

gcc/ChangeLog:

2017-05-09  Trevor Saunders  <tbsaunde+...@tbsaunde.org>

        * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
        auto_sbitmap.
---
 gcc/tree-ssa-dse.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c
index 90230abe822..3ebc19948e1 100644
--- a/gcc/tree-ssa-dse.c
+++ b/gcc/tree-ssa-dse.c
@@ -601,16 +601,14 @@ class dse_dom_walker : public dom_walker
 {
 public:
   dse_dom_walker (cdi_direction direction)
-    : dom_walker (direction), m_byte_tracking_enabled (false)
-
-  { m_live_bytes = sbitmap_alloc (PARAM_VALUE (PARAM_DSE_MAX_OBJECT_SIZE)); }
-
-  ~dse_dom_walker () { sbitmap_free (m_live_bytes); }
+    : dom_walker (direction),
+    m_live_bytes (PARAM_VALUE (PARAM_DSE_MAX_OBJECT_SIZE)),
+    m_byte_tracking_enabled (false) {}
 
   virtual edge before_dom_children (basic_block);
 
 private:
-  sbitmap m_live_bytes;
+  auto_sbitmap m_live_bytes;
   bool m_byte_tracking_enabled;
   void dse_optimize_stmt (gimple_stmt_iterator *);
 };
-- 
2.11.0

Reply via email to