mirror of git://gcc.gnu.org/git/gcc.git
Symbol summary: refactor usage of gcc_checking_asserts
* symbol-summary.h (function_summary::function_summary): Remove checking assert for all cgraph nodes. (function_summary::get): Check summary_uid. (symtab_insertion): Check summary_uid. From-SVN: r235712
This commit is contained in:
parent
3702225c48
commit
0ec955c28f
|
|
@ -1,3 +1,10 @@
|
||||||
|
2016-05-02 Martin Liska <mliska@suse.cz>
|
||||||
|
|
||||||
|
* symbol-summary.h (function_summary::function_summary):
|
||||||
|
Remove checking assert for all cgraph nodes.
|
||||||
|
(function_summary::get): Check summary_uid.
|
||||||
|
(symtab_insertion): Check summary_uid.
|
||||||
|
|
||||||
2016-05-02 Claudiu Zissulescu <claziss@synopsys.com>
|
2016-05-02 Claudiu Zissulescu <claziss@synopsys.com>
|
||||||
|
|
||||||
* config/arc/arc-protos.h (compact_memory_operand_p): Declare.
|
* config/arc/arc-protos.h (compact_memory_operand_p): Declare.
|
||||||
|
|
|
||||||
|
|
@ -39,13 +39,6 @@ public:
|
||||||
function_summary (symbol_table *symtab, bool ggc = false): m_ggc (ggc),
|
function_summary (symbol_table *symtab, bool ggc = false): m_ggc (ggc),
|
||||||
m_map (13, ggc), m_insertion_enabled (true), m_symtab (symtab)
|
m_map (13, ggc), m_insertion_enabled (true), m_symtab (symtab)
|
||||||
{
|
{
|
||||||
if (flag_checking)
|
|
||||||
{
|
|
||||||
cgraph_node *node;
|
|
||||||
FOR_EACH_FUNCTION (node)
|
|
||||||
gcc_assert (node->summary_uid > 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_symtab_insertion_hook =
|
m_symtab_insertion_hook =
|
||||||
symtab->add_cgraph_insertion_hook
|
symtab->add_cgraph_insertion_hook
|
||||||
(function_summary::symtab_insertion, this);
|
(function_summary::symtab_insertion, this);
|
||||||
|
|
@ -124,6 +117,7 @@ public:
|
||||||
/* Getter for summary callgraph node pointer. */
|
/* Getter for summary callgraph node pointer. */
|
||||||
T* get (cgraph_node *node)
|
T* get (cgraph_node *node)
|
||||||
{
|
{
|
||||||
|
gcc_checking_assert (node->summary_uid);
|
||||||
return get (node->summary_uid);
|
return get (node->summary_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,6 +142,7 @@ public:
|
||||||
/* Symbol insertion hook that is registered to symbol table. */
|
/* Symbol insertion hook that is registered to symbol table. */
|
||||||
static void symtab_insertion (cgraph_node *node, void *data)
|
static void symtab_insertion (cgraph_node *node, void *data)
|
||||||
{
|
{
|
||||||
|
gcc_checking_assert (node->summary_uid);
|
||||||
function_summary *summary = (function_summary <T *> *) (data);
|
function_summary *summary = (function_summary <T *> *) (data);
|
||||||
|
|
||||||
if (summary->m_insertion_enabled)
|
if (summary->m_insertion_enabled)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue