Commit 67b3b8fe by Martin Liska Committed by Martin Liska

IPA summaries use ::get in ipa-pure-const.c.

2018-06-21  Martin Liska  <mliska@suse.cz>

	* ipa-pure-const.c (propagate_nothrow): Use
        funct_state_summaries->get.
	(dump_malloc_lattice): Likewise.
	(propagate_malloc): Likewise.

From-SVN: r261848
parent f5fe239e
2018-06-21 Martin Liska <mliska@suse.cz>
* ipa-pure-const.c (propagate_nothrow): Use
funct_state_summaries->get.
(dump_malloc_lattice): Likewise.
(propagate_malloc): Likewise.
2018-06-21 Richard Biener <rguenther@suse.de> 2018-06-21 Richard Biener <rguenther@suse.de>
* lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
......
...@@ -1803,7 +1803,7 @@ propagate_nothrow (void) ...@@ -1803,7 +1803,7 @@ propagate_nothrow (void)
w = node; w = node;
while (w) while (w)
{ {
funct_state w_l = funct_state_summaries->get_create (w); funct_state w_l = funct_state_summaries->get (w);
if (!can_throw && !TREE_NOTHROW (w->decl)) if (!can_throw && !TREE_NOTHROW (w->decl))
{ {
/* Inline clones share declaration with their offline copies; /* Inline clones share declaration with their offline copies;
...@@ -1841,9 +1841,10 @@ dump_malloc_lattice (FILE *dump_file, const char *s) ...@@ -1841,9 +1841,10 @@ dump_malloc_lattice (FILE *dump_file, const char *s)
cgraph_node *node; cgraph_node *node;
FOR_EACH_FUNCTION (node) FOR_EACH_FUNCTION (node)
{ {
funct_state fs = funct_state_summaries->get_create (node); funct_state fs = funct_state_summaries->get (node);
malloc_state_e state = fs->malloc_state; if (fs)
fprintf (dump_file, "%s: %s\n", node->name (), malloc_state_names[state]); fprintf (dump_file, "%s: %s\n", node->name (),
malloc_state_names[fs->malloc_state]);
} }
} }
...@@ -1881,7 +1882,7 @@ propagate_malloc (void) ...@@ -1881,7 +1882,7 @@ propagate_malloc (void)
|| !funct_state_summaries->exists (node)) || !funct_state_summaries->exists (node))
continue; continue;
funct_state l = funct_state_summaries->get_create (node); funct_state l = funct_state_summaries->get (node);
/* FIXME: add support for indirect-calls. */ /* FIXME: add support for indirect-calls. */
if (node->indirect_calls) if (node->indirect_calls)
...@@ -1932,7 +1933,7 @@ propagate_malloc (void) ...@@ -1932,7 +1933,7 @@ propagate_malloc (void)
FOR_EACH_DEFINED_FUNCTION (node) FOR_EACH_DEFINED_FUNCTION (node)
if (funct_state_summaries->exists (node)) if (funct_state_summaries->exists (node))
{ {
funct_state l = funct_state_summaries->get_create (node); funct_state l = funct_state_summaries->get (node);
if (!node->alias if (!node->alias
&& l->malloc_state == STATE_MALLOC && l->malloc_state == STATE_MALLOC
&& !node->global.inlined_to) && !node->global.inlined_to)
......
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