Commit dbe348c1 by Martin Liska Committed by Martin Liska

Update coding style in symbol-summary.h.

2019-11-05  Martin Liska  <mliska@suse.cz>

	* symbol-summary.h: Rename allocator to m_allocator and
	add comment.

From-SVN: r277823
parent f340142b
2019-11-05 Martin Liska <mliska@suse.cz>
* symbol-summary.h: Rename allocator to m_allocator and
add comment.
2019-11-05 Richard Biener <rguenther@suse.de> 2019-11-05 Richard Biener <rguenther@suse.de>
PR tree-optimization/92324 PR tree-optimization/92324
...@@ -31,7 +31,7 @@ public: ...@@ -31,7 +31,7 @@ public:
function_summary_base (symbol_table *symtab CXX_MEM_STAT_INFO): function_summary_base (symbol_table *symtab CXX_MEM_STAT_INFO):
m_symtab (symtab), m_symtab (symtab),
m_insertion_enabled (true), m_insertion_enabled (true),
allocator ("function summary" PASS_MEM_STAT) m_allocator ("function summary" PASS_MEM_STAT)
{} {}
/* Basic implementation of insert operation. */ /* Basic implementation of insert operation. */
...@@ -62,7 +62,7 @@ protected: ...@@ -62,7 +62,7 @@ protected:
/* Call gcc_internal_because we do not want to call finalizer for /* Call gcc_internal_because we do not want to call finalizer for
a type T. We call dtor explicitly. */ a type T. We call dtor explicitly. */
return is_ggc () ? new (ggc_internal_alloc (sizeof (T))) T () return is_ggc () ? new (ggc_internal_alloc (sizeof (T))) T ()
: allocator.allocate () ; : m_allocator.allocate () ;
} }
/* Release an item that is stored within map. */ /* Release an item that is stored within map. */
...@@ -74,7 +74,7 @@ protected: ...@@ -74,7 +74,7 @@ protected:
ggc_free (item); ggc_free (item);
} }
else else
allocator.remove (item); m_allocator.remove (item);
} }
/* Unregister all call-graph hooks. */ /* Unregister all call-graph hooks. */
...@@ -95,7 +95,9 @@ protected: ...@@ -95,7 +95,9 @@ protected:
private: private:
/* Return true when the summary uses GGC memory for allocation. */ /* Return true when the summary uses GGC memory for allocation. */
virtual bool is_ggc () = 0; virtual bool is_ggc () = 0;
object_allocator<T> allocator;
/* Object allocator for heap allocation. */
object_allocator<T> m_allocator;
}; };
template <typename T> template <typename T>
...@@ -537,7 +539,7 @@ public: ...@@ -537,7 +539,7 @@ public:
call_summary_base (symbol_table *symtab CXX_MEM_STAT_INFO): call_summary_base (symbol_table *symtab CXX_MEM_STAT_INFO):
m_symtab (symtab), m_symtab (symtab),
m_initialize_when_cloning (false), m_initialize_when_cloning (false),
allocator ("call summary" PASS_MEM_STAT) m_allocator ("call summary" PASS_MEM_STAT)
{} {}
/* Basic implementation of removal operation. */ /* Basic implementation of removal operation. */
...@@ -553,7 +555,7 @@ protected: ...@@ -553,7 +555,7 @@ protected:
/* Call gcc_internal_because we do not want to call finalizer for /* Call gcc_internal_because we do not want to call finalizer for
a type T. We call dtor explicitly. */ a type T. We call dtor explicitly. */
return is_ggc () ? new (ggc_internal_alloc (sizeof (T))) T () return is_ggc () ? new (ggc_internal_alloc (sizeof (T))) T ()
: allocator.allocate (); : m_allocator.allocate ();
} }
/* Release an item that is stored within map. */ /* Release an item that is stored within map. */
...@@ -565,7 +567,7 @@ protected: ...@@ -565,7 +567,7 @@ protected:
ggc_free (item); ggc_free (item);
} }
else else
allocator.remove (item); m_allocator.remove (item);
} }
/* Unregister all call-graph hooks. */ /* Unregister all call-graph hooks. */
...@@ -584,7 +586,9 @@ protected: ...@@ -584,7 +586,9 @@ protected:
private: private:
/* Return true when the summary uses GGC memory for allocation. */ /* Return true when the summary uses GGC memory for allocation. */
virtual bool is_ggc () = 0; virtual bool is_ggc () = 0;
object_allocator<T> allocator;
/* Object allocator for heap allocation. */
object_allocator<T> m_allocator;
}; };
template <typename T> template <typename T>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment