mirror of git://gcc.gnu.org/git/gcc.git
ipa-pure-const.c (propagate_pure_const, [...]): Do not modify inline clones.
* ipa-pure-const.c (propagate_pure_const, propagate_nothrow): Do not modify inline clones. From-SVN: r208830
This commit is contained in:
parent
72731c33b1
commit
d7636f5609
|
|
@ -1,3 +1,8 @@
|
||||||
|
2014-03-25 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
* ipa-pure-const.c (propagate_pure_const, propagate_nothrow):
|
||||||
|
Do not modify inline clones.
|
||||||
|
|
||||||
2014-03-25 Jakub Jelinek <jakub@redhat.com>
|
2014-03-25 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* config/i386/i386.md (general_sext_operand): New mode attr.
|
* config/i386/i386.md (general_sext_operand): New mode attr.
|
||||||
|
|
|
||||||
|
|
@ -1327,35 +1327,39 @@ propagate_pure_const (void)
|
||||||
w_l->pure_const_state = this_state;
|
w_l->pure_const_state = this_state;
|
||||||
w_l->looping = this_looping;
|
w_l->looping = this_looping;
|
||||||
|
|
||||||
switch (this_state)
|
/* Inline clones share declaration with their offline copies;
|
||||||
{
|
do not modify their declarations since the offline copy may
|
||||||
case IPA_CONST:
|
be different. */
|
||||||
if (!TREE_READONLY (w->decl))
|
if (!w->global.inlined_to)
|
||||||
{
|
switch (this_state)
|
||||||
warn_function_const (w->decl, !this_looping);
|
{
|
||||||
if (dump_file)
|
case IPA_CONST:
|
||||||
fprintf (dump_file, "Function found to be %sconst: %s\n",
|
if (!TREE_READONLY (w->decl))
|
||||||
this_looping ? "looping " : "",
|
{
|
||||||
w->name ());
|
warn_function_const (w->decl, !this_looping);
|
||||||
}
|
if (dump_file)
|
||||||
cgraph_set_const_flag (w, true, this_looping);
|
fprintf (dump_file, "Function found to be %sconst: %s\n",
|
||||||
break;
|
this_looping ? "looping " : "",
|
||||||
|
w->name ());
|
||||||
|
}
|
||||||
|
cgraph_set_const_flag (w, true, this_looping);
|
||||||
|
break;
|
||||||
|
|
||||||
case IPA_PURE:
|
case IPA_PURE:
|
||||||
if (!DECL_PURE_P (w->decl))
|
if (!DECL_PURE_P (w->decl))
|
||||||
{
|
{
|
||||||
warn_function_pure (w->decl, !this_looping);
|
warn_function_pure (w->decl, !this_looping);
|
||||||
if (dump_file)
|
if (dump_file)
|
||||||
fprintf (dump_file, "Function found to be %spure: %s\n",
|
fprintf (dump_file, "Function found to be %spure: %s\n",
|
||||||
this_looping ? "looping " : "",
|
this_looping ? "looping " : "",
|
||||||
w->name ());
|
w->name ());
|
||||||
}
|
}
|
||||||
cgraph_set_pure_flag (w, true, this_looping);
|
cgraph_set_pure_flag (w, true, this_looping);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
w_info = (struct ipa_dfs_info *) w->aux;
|
w_info = (struct ipa_dfs_info *) w->aux;
|
||||||
w = w_info->next_cycle;
|
w = w_info->next_cycle;
|
||||||
}
|
}
|
||||||
|
|
@ -1448,10 +1452,16 @@ propagate_nothrow (void)
|
||||||
funct_state w_l = get_function_state (w);
|
funct_state w_l = get_function_state (w);
|
||||||
if (!can_throw && !TREE_NOTHROW (w->decl))
|
if (!can_throw && !TREE_NOTHROW (w->decl))
|
||||||
{
|
{
|
||||||
cgraph_set_nothrow_flag (w, true);
|
/* Inline clones share declaration with their offline copies;
|
||||||
if (dump_file)
|
do not modify their declarations since the offline copy may
|
||||||
fprintf (dump_file, "Function found to be nothrow: %s\n",
|
be different. */
|
||||||
w->name ());
|
if (!w->global.inlined_to)
|
||||||
|
{
|
||||||
|
cgraph_set_nothrow_flag (w, true);
|
||||||
|
if (dump_file)
|
||||||
|
fprintf (dump_file, "Function found to be nothrow: %s\n",
|
||||||
|
w->name ());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (can_throw && !TREE_NOTHROW (w->decl))
|
else if (can_throw && !TREE_NOTHROW (w->decl))
|
||||||
w_l->can_throw = true;
|
w_l->can_throw = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue